<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">-- -fno-warn-deprecations for use of Map.foldWithKey</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# OPTIONS_GHC -fno-warn-deprecations #-}</span><span>
</span><span id="line-3"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-4"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- Module      :  Distribution.PackageDescription.Configuration</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- Copyright   :  Thomas Schilling, 2007</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- License     :  BSD3</span><span>
</span><span id="line-8"></span><span class="hs-comment">--</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- Maintainer  :  cabal-devel@haskell.org</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-11"></span><span class="hs-comment">--</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- This is about the cabal configurations feature. It exports</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- 'finalizePD' and 'flattenPackageDescription' which are</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- functions for converting 'GenericPackageDescription's down to</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- 'PackageDescription's. It has code for working with the tree of conditions</span><span>
</span><span id="line-16"></span><span class="hs-comment">-- and resolving or flattening conditions.</span><span>
</span><span id="line-17"></span><span>
</span><span id="line-18"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Distribution.PackageDescription.Configuration</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-19"></span><span>    </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#finalizePD"><span class="hs-identifier">finalizePD</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span>    </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#flattenPackageDescription"><span class="hs-identifier">flattenPackageDescription</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-21"></span><span>
</span><span id="line-22"></span><span>    </span><span class="hs-comment">-- Utils</span><span>
</span><span id="line-23"></span><span>    </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#parseCondition"><span class="hs-identifier">parseCondition</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-24"></span><span>    </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#freeVars"><span class="hs-identifier">freeVars</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-25"></span><span>    </span><span class="annot"><a href="Distribution.Types.CondTree.html#extractCondition"><span class="hs-identifier">extractCondition</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-26"></span><span>    </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#extractConditions"><span class="hs-identifier">extractConditions</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-27"></span><span>    </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#addBuildableCondition"><span class="hs-identifier">addBuildableCondition</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-28"></span><span>    </span><span class="annot"><a href="Distribution.Types.CondTree.html#mapCondTree"><span class="hs-identifier">mapCondTree</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-29"></span><span>    </span><span class="annot"><a href="Distribution.Types.CondTree.html#mapTreeData"><span class="hs-identifier">mapTreeData</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-30"></span><span>    </span><span class="annot"><a href="Distribution.Types.CondTree.html#mapTreeConds"><span class="hs-identifier">mapTreeConds</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>    </span><span class="annot"><a href="Distribution.Types.CondTree.html#mapTreeConstrs"><span class="hs-identifier">mapTreeConstrs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-32"></span><span>    </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#transformAllBuildInfos"><span class="hs-identifier">transformAllBuildInfos</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-33"></span><span>    </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#transformAllBuildDepends"><span class="hs-identifier">transformAllBuildDepends</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-34"></span><span>    </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#transformAllBuildDependsN"><span class="hs-identifier">transformAllBuildDependsN</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-35"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-36"></span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Prelude.html"><span class="hs-identifier">Distribution.Compat.Prelude</span></a></span><span>
</span><span id="line-38"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-39"></span><span>
</span><span id="line-40"></span><span class="hs-comment">-- lens</span><span>
</span><span id="line-41"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.Types.BuildInfo.Lens.html"><span class="hs-identifier">Distribution.Types.BuildInfo.Lens</span></a></span><span>                 </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">L</span></span><span>
</span><span id="line-42"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.Types.GenericPackageDescription.Lens.html"><span class="hs-identifier">Distribution.Types.GenericPackageDescription.Lens</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">L</span></span><span>
</span><span id="line-43"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.Lens.html"><span class="hs-identifier">Distribution.Types.PackageDescription.Lens</span></a></span><span>        </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">L</span></span><span>
</span><span id="line-44"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.Types.SetupBuildInfo.Lens.html"><span class="hs-identifier">Distribution.Types.SetupBuildInfo.Lens</span></a></span><span>            </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">L</span></span><span>
</span><span id="line-45"></span><span>
</span><span id="line-46"></span><span class="hs-keyword">import</span><span>           </span><span class="annot"><a href="Distribution.Compat.CharParsing.html"><span class="hs-identifier">Distribution.Compat.CharParsing</span></a></span><span>             </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Compat.CharParsing.html#char"><span class="hs-identifier">char</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-47"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.Compat.CharParsing.html"><span class="hs-identifier">Distribution.Compat.CharParsing</span></a></span><span>             </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">P</span></span><span>
</span><span id="line-48"></span><span class="hs-keyword">import</span><span>           </span><span class="annot"><a href="Distribution.Compat.Lens.html"><span class="hs-identifier">Distribution.Compat.Lens</span></a></span><span>
</span><span id="line-49"></span><span class="hs-keyword">import</span><span>           </span><span class="annot"><a href="Distribution.Compiler.html"><span class="hs-identifier">Distribution.Compiler</span></a></span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span>           </span><span class="annot"><a href="Distribution.PackageDescription.html"><span class="hs-identifier">Distribution.PackageDescription</span></a></span><span>
</span><span id="line-51"></span><span class="hs-keyword">import</span><span>           </span><span class="annot"><a href="Distribution.PackageDescription.Utils.html"><span class="hs-identifier">Distribution.PackageDescription.Utils</span></a></span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span>           </span><span class="annot"><a href="Distribution.Parsec.html"><span class="hs-identifier">Distribution.Parsec</span></a></span><span>
</span><span id="line-53"></span><span class="hs-keyword">import</span><span>           </span><span class="annot"><a href="Distribution.Pretty.html"><span class="hs-identifier">Distribution.Pretty</span></a></span><span>
</span><span id="line-54"></span><span class="hs-keyword">import</span><span>           </span><span class="annot"><a href="Distribution.Simple.Utils.html"><span class="hs-identifier">Distribution.Simple.Utils</span></a></span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span>           </span><span class="annot"><a href="Distribution.System.html"><span class="hs-identifier">Distribution.System</span></a></span><span>
</span><span id="line-56"></span><span class="hs-keyword">import</span><span>           </span><span class="annot"><a href="Distribution.Types.Component.html"><span class="hs-identifier">Distribution.Types.Component</span></a></span><span>
</span><span id="line-57"></span><span class="hs-keyword">import</span><span>           </span><span class="annot"><a href="Distribution.Types.ComponentRequestedSpec.html"><span class="hs-identifier">Distribution.Types.ComponentRequestedSpec</span></a></span><span>
</span><span id="line-58"></span><span class="hs-keyword">import</span><span>           </span><span class="annot"><a href="Distribution.Types.DependencyMap.html"><span class="hs-identifier">Distribution.Types.DependencyMap</span></a></span><span>
</span><span id="line-59"></span><span class="hs-keyword">import</span><span>           </span><span class="annot"><a href="Distribution.Types.PackageVersionConstraint.html"><span class="hs-identifier">Distribution.Types.PackageVersionConstraint</span></a></span><span>
</span><span id="line-60"></span><span class="hs-keyword">import</span><span>           </span><span class="annot"><a href="Distribution.Version.html"><span class="hs-identifier">Distribution.Version</span></a></span><span>
</span><span id="line-61"></span><span>
</span><span id="line-62"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Lazy.html#"><span class="hs-identifier">Data.Map.Lazy</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Map</span></span><span>
</span><span id="line-63"></span><span class="hs-keyword">import</span><span>           </span><span class="annot"><a href="../../containers/src/Data.Tree.html#"><span class="hs-identifier">Data.Tree</span></a></span><span>     </span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.Tree.html#Tree"><span class="hs-identifier">Tree</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.Tree.html#Node"><span class="hs-identifier">Node</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-64"></span><span>
</span><span id="line-65"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-66"></span><span>
</span><span id="line-67"></span><span class="hs-comment">-- | Simplify a configuration condition using the OS and arch names.  Returns</span><span>
</span><span id="line-68"></span><span class="hs-comment">--   the names of all the flags occurring in the condition.</span><span>
</span><span id="line-69"></span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#simplifyWithSysParams"><span class="hs-identifier hs-type">simplifyWithSysParams</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.System.html#OS"><span class="hs-identifier hs-type">OS</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.System.html#Arch"><span class="hs-identifier hs-type">Arch</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Compiler.html#CompilerInfo"><span class="hs-identifier hs-type">CompilerInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.Condition.html#Condition"><span class="hs-identifier hs-type">Condition</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.ConfVar.html#ConfVar"><span class="hs-identifier hs-type">ConfVar</span></a></span><span>
</span><span id="line-70"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.Condition.html#Condition"><span class="hs-identifier hs-type">Condition</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.Flag.html#FlagName"><span class="hs-identifier hs-type">FlagName</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.Flag.html#FlagName"><span class="hs-identifier hs-type">FlagName</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-71"></span><span id="simplifyWithSysParams"><span class="annot"><span class="annottext">simplifyWithSysParams :: OS
-&gt; Arch
-&gt; CompilerInfo
-&gt; Condition ConfVar
-&gt; (Condition FlagName, [FlagName])
</span><a href="Distribution.PackageDescription.Configuration.html#simplifyWithSysParams"><span class="hs-identifier hs-var hs-var">simplifyWithSysParams</span></a></span></span><span> </span><span id="local-6989586621679695165"><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679695165"><span class="hs-identifier hs-var">os</span></a></span></span><span> </span><span id="local-6989586621679695164"><span class="annot"><span class="annottext">Arch
</span><a href="#local-6989586621679695164"><span class="hs-identifier hs-var">arch</span></a></span></span><span> </span><span id="local-6989586621679695163"><span class="annot"><span class="annottext">CompilerInfo
</span><a href="#local-6989586621679695163"><span class="hs-identifier hs-var">cinfo</span></a></span></span><span> </span><span id="local-6989586621679695162"><span class="annot"><span class="annottext">Condition ConfVar
</span><a href="#local-6989586621679695162"><span class="hs-identifier hs-var">cond</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Condition FlagName
</span><a href="#local-6989586621679695161"><span class="hs-identifier hs-var">cond'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[FlagName]
</span><a href="#local-6989586621679695160"><span class="hs-identifier hs-var">flags</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-72"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-73"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679695161"><span class="annot"><span class="annottext">Condition FlagName
</span><a href="#local-6989586621679695161"><span class="hs-identifier hs-var">cond'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679695160"><span class="annot"><span class="annottext">[FlagName]
</span><a href="#local-6989586621679695160"><span class="hs-identifier hs-var">flags</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Condition ConfVar
-&gt; (ConfVar -&gt; Either FlagName Bool)
-&gt; (Condition FlagName, [FlagName])
forall c d.
Condition c -&gt; (c -&gt; Either d Bool) -&gt; (Condition d, [d])
</span><a href="Distribution.Types.Condition.html#simplifyCondition"><span class="hs-identifier hs-var">simplifyCondition</span></a></span><span> </span><span class="annot"><span class="annottext">Condition ConfVar
</span><a href="#local-6989586621679695162"><span class="hs-identifier hs-var">cond</span></a></span><span> </span><span class="annot"><span class="annottext">ConfVar -&gt; Either FlagName Bool
</span><a href="#local-6989586621679695158"><span class="hs-identifier hs-var">interp</span></a></span><span>
</span><span id="line-74"></span><span>    </span><span id="local-6989586621679695158"><span class="annot"><span class="annottext">interp :: ConfVar -&gt; Either FlagName Bool
</span><a href="#local-6989586621679695158"><span class="hs-identifier hs-var hs-var">interp</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.ConfVar.html#OS"><span class="hs-identifier hs-type">OS</span></a></span><span> </span><span id="local-6989586621679695151"><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679695151"><span class="hs-identifier hs-var">os'</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Either FlagName Bool
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Either FlagName Bool) -&gt; Bool -&gt; Either FlagName Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679695151"><span class="hs-identifier hs-var">os'</span></a></span><span> </span><span class="annot"><span class="annottext">OS -&gt; OS -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679695165"><span class="hs-identifier hs-var">os</span></a></span><span>
</span><span id="line-75"></span><span>    </span><span class="annot"><a href="#local-6989586621679695158"><span class="hs-identifier hs-var">interp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.ConfVar.html#Arch"><span class="hs-identifier hs-type">Arch</span></a></span><span> </span><span id="local-6989586621679695149"><span class="annot"><span class="annottext">Arch
</span><a href="#local-6989586621679695149"><span class="hs-identifier hs-var">arch'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Either FlagName Bool
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Either FlagName Bool) -&gt; Bool -&gt; Either FlagName Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Arch
</span><a href="#local-6989586621679695149"><span class="hs-identifier hs-var">arch'</span></a></span><span> </span><span class="annot"><span class="annottext">Arch -&gt; Arch -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Arch
</span><a href="#local-6989586621679695164"><span class="hs-identifier hs-var">arch</span></a></span><span>
</span><span id="line-76"></span><span>    </span><span class="annot"><a href="#local-6989586621679695158"><span class="hs-identifier hs-var">interp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.ConfVar.html#Impl"><span class="hs-identifier hs-type">Impl</span></a></span><span> </span><span id="local-6989586621679695147"><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="#local-6989586621679695147"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span id="local-6989586621679695146"><span class="annot"><span class="annottext">VersionRange
</span><a href="#local-6989586621679695146"><span class="hs-identifier hs-var">vr</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-77"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CompilerId -&gt; Bool
</span><a href="#local-6989586621679695145"><span class="hs-identifier hs-var">matchImpl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CompilerInfo -&gt; CompilerId
</span><a href="Distribution.Compiler.html#compilerInfoId"><span class="hs-identifier hs-var hs-var">compilerInfoId</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerInfo
</span><a href="#local-6989586621679695163"><span class="hs-identifier hs-var">cinfo</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Either FlagName Bool
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-78"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">CompilerInfo -&gt; Maybe [CompilerId]
</span><a href="Distribution.Compiler.html#compilerInfoCompat"><span class="hs-identifier hs-var hs-var">compilerInfoCompat</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerInfo
</span><a href="#local-6989586621679695163"><span class="hs-identifier hs-var">cinfo</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-79"></span><span>          </span><span class="hs-comment">-- fixme: treat Nothing as unknown, rather than empty list once we</span><span>
</span><span id="line-80"></span><span>          </span><span class="hs-comment">--        support partial resolution of system parameters</span><span>
</span><span id="line-81"></span><span>          </span><span class="annot"><span class="annottext">Maybe [CompilerId]
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Either FlagName Bool
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-82"></span><span>          </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679695142"><span class="annot"><span class="annottext">[CompilerId]
</span><a href="#local-6989586621679695142"><span class="hs-identifier hs-var">compat</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Either FlagName Bool
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(CompilerId -&gt; Bool) -&gt; [CompilerId] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#any"><span class="hs-identifier hs-var">any</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerId -&gt; Bool
</span><a href="#local-6989586621679695145"><span class="hs-identifier hs-var">matchImpl</span></a></span><span> </span><span class="annot"><span class="annottext">[CompilerId]
</span><a href="#local-6989586621679695142"><span class="hs-identifier hs-var">compat</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-83"></span><span>          </span><span class="hs-keyword">where</span><span>
</span><span id="line-84"></span><span>            </span><span id="local-6989586621679695145"><span class="annot"><span class="annottext">matchImpl :: CompilerId -&gt; Bool
</span><a href="#local-6989586621679695145"><span class="hs-identifier hs-var hs-var">matchImpl</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Compiler.html#CompilerId"><span class="hs-identifier hs-type">CompilerId</span></a></span><span> </span><span id="local-6989586621679695137"><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="#local-6989586621679695137"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679695136"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679695136"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="#local-6989586621679695147"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor -&gt; CompilerFlavor -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="#local-6989586621679695137"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679695136"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; VersionRange -&gt; Bool
</span><a href="Distribution.Types.VersionRange.html#withinRange"><span class="hs-operator hs-var">`withinRange`</span></a></span><span> </span><span class="annot"><span class="annottext">VersionRange
</span><a href="#local-6989586621679695146"><span class="hs-identifier hs-var">vr</span></a></span><span>
</span><span id="line-85"></span><span>    </span><span class="annot"><a href="#local-6989586621679695158"><span class="hs-identifier hs-var">interp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.ConfVar.html#PackageFlag"><span class="hs-identifier hs-type">PackageFlag</span></a></span><span> </span><span id="local-6989586621679695132"><span class="annot"><span class="annottext">FlagName
</span><a href="#local-6989586621679695132"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FlagName -&gt; Either FlagName Bool
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">FlagName
</span><a href="#local-6989586621679695132"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-86"></span><span>
</span><span id="line-87"></span><span class="hs-comment">-- TODO: Add instances and check</span><span>
</span><span id="line-88"></span><span class="hs-comment">--</span><span>
</span><span id="line-89"></span><span class="hs-comment">-- prop_sC_idempotent cond a o = cond' == cond''</span><span>
</span><span id="line-90"></span><span class="hs-comment">--   where</span><span>
</span><span id="line-91"></span><span class="hs-comment">--     cond'  = simplifyCondition cond a o</span><span>
</span><span id="line-92"></span><span class="hs-comment">--     cond'' = simplifyCondition cond' a o</span><span>
</span><span id="line-93"></span><span class="hs-comment">--</span><span>
</span><span id="line-94"></span><span class="hs-comment">-- prop_sC_noLits cond a o = isLit res || not (hasLits res)</span><span>
</span><span id="line-95"></span><span class="hs-comment">--   where</span><span>
</span><span id="line-96"></span><span class="hs-comment">--     res = simplifyCondition cond a o</span><span>
</span><span id="line-97"></span><span class="hs-comment">--     hasLits (Lit _) = True</span><span>
</span><span id="line-98"></span><span class="hs-comment">--     hasLits (CNot c) = hasLits c</span><span>
</span><span id="line-99"></span><span class="hs-comment">--     hasLits (COr l r) = hasLits l || hasLits r</span><span>
</span><span id="line-100"></span><span class="hs-comment">--     hasLits (CAnd l r) = hasLits l || hasLits r</span><span>
</span><span id="line-101"></span><span class="hs-comment">--     hasLits _ = False</span><span>
</span><span id="line-102"></span><span class="hs-comment">--</span><span>
</span><span id="line-103"></span><span>
</span><span id="line-104"></span><span class="hs-comment">-- | Parse a configuration condition from a string.</span><span>
</span><span id="line-105"></span><span id="local-6989586621679695499"><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#parseCondition"><span class="hs-identifier hs-type">parseCondition</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Parsec.html#CabalParsing"><span class="hs-identifier hs-type">CabalParsing</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679695499"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679695499"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.Condition.html#Condition"><span class="hs-identifier hs-type">Condition</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.ConfVar.html#ConfVar"><span class="hs-identifier hs-type">ConfVar</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-106"></span><span id="parseCondition"><span class="annot"><span class="annottext">parseCondition :: forall (m :: * -&gt; *). CabalParsing m =&gt; m (Condition ConfVar)
</span><a href="Distribution.PackageDescription.Configuration.html#parseCondition"><span class="hs-identifier hs-var hs-var">parseCondition</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Condition ConfVar)
</span><a href="#local-6989586621679695116"><span class="hs-identifier hs-var">condOr</span></a></span><span>
</span><span id="line-107"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-108"></span><span>    </span><span id="local-6989586621679695116"><span class="annot"><span class="annottext">condOr :: m (Condition ConfVar)
</span><a href="#local-6989586621679695116"><span class="hs-identifier hs-var hs-var">condOr</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Condition ConfVar) -&gt; m () -&gt; m (NonEmpty (Condition ConfVar))
forall (m :: * -&gt; *) a sep.
Alternative m =&gt;
m a -&gt; m sep -&gt; m (NonEmpty a)
</span><a href="Distribution.Compat.Parsing.html#sepByNonEmpty"><span class="hs-identifier hs-var">sepByNonEmpty</span></a></span><span> </span><span class="annot"><span class="annottext">m (Condition ConfVar)
</span><a href="#local-6989586621679695096"><span class="hs-identifier hs-var">condAnd</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; m ()
</span><a href="#local-6989586621679695095"><span class="hs-identifier hs-var">oper</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;||&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">m (NonEmpty (Condition ConfVar))
-&gt; (NonEmpty (Condition ConfVar) -&gt; m (Condition ConfVar))
-&gt; m (Condition ConfVar)
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Condition ConfVar -&gt; m (Condition ConfVar)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Condition ConfVar -&gt; m (Condition ConfVar))
-&gt; (NonEmpty (Condition ConfVar) -&gt; Condition ConfVar)
-&gt; NonEmpty (Condition ConfVar)
-&gt; m (Condition ConfVar)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(Condition ConfVar -&gt; Condition ConfVar -&gt; Condition ConfVar)
-&gt; NonEmpty (Condition ConfVar) -&gt; Condition ConfVar
forall a. (a -&gt; a -&gt; a) -&gt; NonEmpty a -&gt; a
</span><a href="Distribution.Compat.Prelude.html#foldl1"><span class="hs-identifier hs-var">foldl1</span></a></span><span> </span><span class="annot"><span class="annottext">Condition ConfVar -&gt; Condition ConfVar -&gt; Condition ConfVar
forall c. Condition c -&gt; Condition c -&gt; Condition c
</span><a href="Distribution.Types.Condition.html#COr"><span class="hs-identifier hs-var">COr</span></a></span><span>
</span><span id="line-109"></span><span>    </span><span id="local-6989586621679695096"><span class="annot"><span class="annottext">condAnd :: m (Condition ConfVar)
</span><a href="#local-6989586621679695096"><span class="hs-identifier hs-var hs-var">condAnd</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Condition ConfVar) -&gt; m () -&gt; m (NonEmpty (Condition ConfVar))
forall (m :: * -&gt; *) a sep.
Alternative m =&gt;
m a -&gt; m sep -&gt; m (NonEmpty a)
</span><a href="Distribution.Compat.Parsing.html#sepByNonEmpty"><span class="hs-identifier hs-var">sepByNonEmpty</span></a></span><span> </span><span class="annot"><span class="annottext">m (Condition ConfVar)
</span><a href="#local-6989586621679695091"><span class="hs-identifier hs-var">cond</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; m ()
</span><a href="#local-6989586621679695095"><span class="hs-identifier hs-var">oper</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&amp;&amp;&quot;</span></span><span class="hs-special">)</span><span class="annot"><span class="annottext">m (NonEmpty (Condition ConfVar))
-&gt; (NonEmpty (Condition ConfVar) -&gt; m (Condition ConfVar))
-&gt; m (Condition ConfVar)
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Condition ConfVar -&gt; m (Condition ConfVar)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Condition ConfVar -&gt; m (Condition ConfVar))
-&gt; (NonEmpty (Condition ConfVar) -&gt; Condition ConfVar)
-&gt; NonEmpty (Condition ConfVar)
-&gt; m (Condition ConfVar)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(Condition ConfVar -&gt; Condition ConfVar -&gt; Condition ConfVar)
-&gt; NonEmpty (Condition ConfVar) -&gt; Condition ConfVar
forall a. (a -&gt; a -&gt; a) -&gt; NonEmpty a -&gt; a
</span><a href="Distribution.Compat.Prelude.html#foldl1"><span class="hs-identifier hs-var">foldl1</span></a></span><span> </span><span class="annot"><span class="annottext">Condition ConfVar -&gt; Condition ConfVar -&gt; Condition ConfVar
forall c. Condition c -&gt; Condition c -&gt; Condition c
</span><a href="Distribution.Types.Condition.html#CAnd"><span class="hs-identifier hs-var">CAnd</span></a></span><span>
</span><span id="line-110"></span><span>    </span><span class="hs-comment">-- TODO: try?</span><span>
</span><span id="line-111"></span><span>    </span><span id="local-6989586621679695091"><span class="annot"><span class="annottext">cond :: m (Condition ConfVar)
</span><a href="#local-6989586621679695091"><span class="hs-identifier hs-var hs-var">cond</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m ()
</span><a href="#local-6989586621679695089"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="annot"><span class="annottext">m () -&gt; m (Condition ConfVar) -&gt; m (Condition ConfVar)
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">m (Condition ConfVar)
forall {c}. m (Condition c)
</span><a href="#local-6989586621679695088"><span class="hs-identifier hs-var">boolLiteral</span></a></span><span> </span><span class="annot"><span class="annottext">m (Condition ConfVar)
-&gt; m (Condition ConfVar) -&gt; m (Condition ConfVar)
forall (f :: * -&gt; *) a. Alternative f =&gt; f a -&gt; f a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">m (Condition ConfVar) -&gt; m (Condition ConfVar)
forall {a}. m a -&gt; m a
</span><a href="#local-6989586621679695086"><span class="hs-identifier hs-var">inparens</span></a></span><span> </span><span class="annot"><span class="annottext">m (Condition ConfVar)
</span><a href="#local-6989586621679695116"><span class="hs-identifier hs-var">condOr</span></a></span><span> </span><span class="annot"><span class="annottext">m (Condition ConfVar)
-&gt; m (Condition ConfVar) -&gt; m (Condition ConfVar)
forall (f :: * -&gt; *) a. Alternative f =&gt; f a -&gt; f a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">m (Condition ConfVar)
</span><a href="#local-6989586621679695085"><span class="hs-identifier hs-var">notCond</span></a></span><span> </span><span class="annot"><span class="annottext">m (Condition ConfVar)
-&gt; m (Condition ConfVar) -&gt; m (Condition ConfVar)
forall (f :: * -&gt; *) a. Alternative f =&gt; f a -&gt; f a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">m (Condition ConfVar)
</span><a href="#local-6989586621679695084"><span class="hs-identifier hs-var">osCond</span></a></span><span>
</span><span id="line-112"></span><span>                      </span><span class="annot"><span class="annottext">m (Condition ConfVar)
-&gt; m (Condition ConfVar) -&gt; m (Condition ConfVar)
forall (f :: * -&gt; *) a. Alternative f =&gt; f a -&gt; f a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">m (Condition ConfVar)
</span><a href="#local-6989586621679695083"><span class="hs-identifier hs-var">archCond</span></a></span><span> </span><span class="annot"><span class="annottext">m (Condition ConfVar)
-&gt; m (Condition ConfVar) -&gt; m (Condition ConfVar)
forall (f :: * -&gt; *) a. Alternative f =&gt; f a -&gt; f a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">m (Condition ConfVar)
</span><a href="#local-6989586621679695082"><span class="hs-identifier hs-var">flagCond</span></a></span><span> </span><span class="annot"><span class="annottext">m (Condition ConfVar)
-&gt; m (Condition ConfVar) -&gt; m (Condition ConfVar)
forall (f :: * -&gt; *) a. Alternative f =&gt; f a -&gt; f a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">m (Condition ConfVar)
</span><a href="#local-6989586621679695081"><span class="hs-identifier hs-var">implCond</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-113"></span><span>    </span><span id="local-6989586621679695086"><span class="annot"><span class="annottext">inparens :: m a -&gt; m a
</span><a href="#local-6989586621679695086"><span class="hs-identifier hs-var hs-var">inparens</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m () -&gt; m () -&gt; m a -&gt; m a
forall (m :: * -&gt; *) bra ket a.
Applicative m =&gt;
m bra -&gt; m ket -&gt; m a -&gt; m a
</span><a href="Distribution.Compat.Parsing.html#between"><span class="hs-identifier hs-var">between</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; m Char
forall (m :: * -&gt; *). CharParsing m =&gt; Char -&gt; m Char
</span><a href="Distribution.Compat.CharParsing.html#char"><span class="hs-identifier hs-var">P.char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'('</span></span><span> </span><span class="annot"><span class="annottext">m Char -&gt; m () -&gt; m ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">m ()
</span><a href="#local-6989586621679695089"><span class="hs-identifier hs-var">sp</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">m ()
</span><a href="#local-6989586621679695089"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="annot"><span class="annottext">m () -&gt; m Char -&gt; m Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; m Char
forall (m :: * -&gt; *). CharParsing m =&gt; Char -&gt; m Char
</span><a href="Distribution.Compat.CharParsing.html#char"><span class="hs-identifier hs-var">P.char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">')'</span></span><span> </span><span class="annot"><span class="annottext">m Char -&gt; m () -&gt; m ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">m ()
</span><a href="#local-6989586621679695089"><span class="hs-identifier hs-var">sp</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-114"></span><span>    </span><span id="local-6989586621679695085"><span class="annot"><span class="annottext">notCond :: m (Condition ConfVar)
</span><a href="#local-6989586621679695085"><span class="hs-identifier hs-var hs-var">notCond</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; m Char
forall (m :: * -&gt; *). CharParsing m =&gt; Char -&gt; m Char
</span><a href="Distribution.Compat.CharParsing.html#char"><span class="hs-identifier hs-var">P.char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'!'</span></span><span> </span><span class="annot"><span class="annottext">m Char -&gt; m () -&gt; m ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">m ()
</span><a href="#local-6989586621679695089"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="annot"><span class="annottext">m () -&gt; m (Condition ConfVar) -&gt; m (Condition ConfVar)
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">m (Condition ConfVar)
</span><a href="#local-6989586621679695091"><span class="hs-identifier hs-var">cond</span></a></span><span> </span><span class="annot"><span class="annottext">m (Condition ConfVar)
-&gt; (Condition ConfVar -&gt; m (Condition ConfVar))
-&gt; m (Condition ConfVar)
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Condition ConfVar -&gt; m (Condition ConfVar)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Condition ConfVar -&gt; m (Condition ConfVar))
-&gt; (Condition ConfVar -&gt; Condition ConfVar)
-&gt; Condition ConfVar
-&gt; m (Condition ConfVar)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Condition ConfVar -&gt; Condition ConfVar
forall c. Condition c -&gt; Condition c
</span><a href="Distribution.Types.Condition.html#CNot"><span class="hs-identifier hs-var">CNot</span></a></span><span>
</span><span id="line-115"></span><span>    </span><span id="local-6989586621679695084"><span class="annot"><span class="annottext">osCond :: m (Condition ConfVar)
</span><a href="#local-6989586621679695084"><span class="hs-identifier hs-var hs-var">osCond</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; m String
forall (m :: * -&gt; *). CharParsing m =&gt; String -&gt; m String
</span><a href="Distribution.Compat.CharParsing.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;os&quot;</span></span><span> </span><span class="annot"><span class="annottext">m String -&gt; m () -&gt; m ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">m ()
</span><a href="#local-6989586621679695089"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="annot"><span class="annottext">m () -&gt; m ConfVar -&gt; m ConfVar
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">m ConfVar -&gt; m ConfVar
forall {a}. m a -&gt; m a
</span><a href="#local-6989586621679695086"><span class="hs-identifier hs-var">inparens</span></a></span><span> </span><span class="annot"><span class="annottext">m ConfVar
</span><a href="#local-6989586621679695066"><span class="hs-identifier hs-var">osIdent</span></a></span><span> </span><span class="annot"><span class="annottext">m ConfVar
-&gt; (ConfVar -&gt; m (Condition ConfVar)) -&gt; m (Condition ConfVar)
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Condition ConfVar -&gt; m (Condition ConfVar)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Condition ConfVar -&gt; m (Condition ConfVar))
-&gt; (ConfVar -&gt; Condition ConfVar)
-&gt; ConfVar
-&gt; m (Condition ConfVar)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ConfVar -&gt; Condition ConfVar
forall c. c -&gt; Condition c
</span><a href="Distribution.Types.Condition.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span>
</span><span id="line-116"></span><span>    </span><span id="local-6989586621679695083"><span class="annot"><span class="annottext">archCond :: m (Condition ConfVar)
</span><a href="#local-6989586621679695083"><span class="hs-identifier hs-var hs-var">archCond</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; m String
forall (m :: * -&gt; *). CharParsing m =&gt; String -&gt; m String
</span><a href="Distribution.Compat.CharParsing.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;arch&quot;</span></span><span> </span><span class="annot"><span class="annottext">m String -&gt; m () -&gt; m ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">m ()
</span><a href="#local-6989586621679695089"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="annot"><span class="annottext">m () -&gt; m ConfVar -&gt; m ConfVar
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">m ConfVar -&gt; m ConfVar
forall {a}. m a -&gt; m a
</span><a href="#local-6989586621679695086"><span class="hs-identifier hs-var">inparens</span></a></span><span> </span><span class="annot"><span class="annottext">m ConfVar
</span><a href="#local-6989586621679695059"><span class="hs-identifier hs-var">archIdent</span></a></span><span> </span><span class="annot"><span class="annottext">m ConfVar
-&gt; (ConfVar -&gt; m (Condition ConfVar)) -&gt; m (Condition ConfVar)
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Condition ConfVar -&gt; m (Condition ConfVar)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Condition ConfVar -&gt; m (Condition ConfVar))
-&gt; (ConfVar -&gt; Condition ConfVar)
-&gt; ConfVar
-&gt; m (Condition ConfVar)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ConfVar -&gt; Condition ConfVar
forall c. c -&gt; Condition c
</span><a href="Distribution.Types.Condition.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span>
</span><span id="line-117"></span><span>    </span><span id="local-6989586621679695082"><span class="annot"><span class="annottext">flagCond :: m (Condition ConfVar)
</span><a href="#local-6989586621679695082"><span class="hs-identifier hs-var hs-var">flagCond</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; m String
forall (m :: * -&gt; *). CharParsing m =&gt; String -&gt; m String
</span><a href="Distribution.Compat.CharParsing.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;flag&quot;</span></span><span> </span><span class="annot"><span class="annottext">m String -&gt; m () -&gt; m ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">m ()
</span><a href="#local-6989586621679695089"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="annot"><span class="annottext">m () -&gt; m ConfVar -&gt; m ConfVar
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">m ConfVar -&gt; m ConfVar
forall {a}. m a -&gt; m a
</span><a href="#local-6989586621679695086"><span class="hs-identifier hs-var">inparens</span></a></span><span> </span><span class="annot"><span class="annottext">m ConfVar
</span><a href="#local-6989586621679695053"><span class="hs-identifier hs-var">flagIdent</span></a></span><span> </span><span class="annot"><span class="annottext">m ConfVar
-&gt; (ConfVar -&gt; m (Condition ConfVar)) -&gt; m (Condition ConfVar)
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Condition ConfVar -&gt; m (Condition ConfVar)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Condition ConfVar -&gt; m (Condition ConfVar))
-&gt; (ConfVar -&gt; Condition ConfVar)
-&gt; ConfVar
-&gt; m (Condition ConfVar)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ConfVar -&gt; Condition ConfVar
forall c. c -&gt; Condition c
</span><a href="Distribution.Types.Condition.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span>
</span><span id="line-118"></span><span>    </span><span id="local-6989586621679695081"><span class="annot"><span class="annottext">implCond :: m (Condition ConfVar)
</span><a href="#local-6989586621679695081"><span class="hs-identifier hs-var hs-var">implCond</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; m String
forall (m :: * -&gt; *). CharParsing m =&gt; String -&gt; m String
</span><a href="Distribution.Compat.CharParsing.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;impl&quot;</span></span><span> </span><span class="annot"><span class="annottext">m String -&gt; m () -&gt; m ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">m ()
</span><a href="#local-6989586621679695089"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="annot"><span class="annottext">m () -&gt; m ConfVar -&gt; m ConfVar
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">m ConfVar -&gt; m ConfVar
forall {a}. m a -&gt; m a
</span><a href="#local-6989586621679695086"><span class="hs-identifier hs-var">inparens</span></a></span><span> </span><span class="annot"><span class="annottext">m ConfVar
</span><a href="#local-6989586621679695047"><span class="hs-identifier hs-var">implIdent</span></a></span><span> </span><span class="annot"><span class="annottext">m ConfVar
-&gt; (ConfVar -&gt; m (Condition ConfVar)) -&gt; m (Condition ConfVar)
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Condition ConfVar -&gt; m (Condition ConfVar)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Condition ConfVar -&gt; m (Condition ConfVar))
-&gt; (ConfVar -&gt; Condition ConfVar)
-&gt; ConfVar
-&gt; m (Condition ConfVar)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ConfVar -&gt; Condition ConfVar
forall c. c -&gt; Condition c
</span><a href="Distribution.Types.Condition.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span>
</span><span id="line-119"></span><span>    </span><span id="local-6989586621679695088"><span class="annot"><span class="annottext">boolLiteral :: m (Condition c)
</span><a href="#local-6989586621679695088"><span class="hs-identifier hs-var hs-var">boolLiteral</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Condition c) -&gt; m Bool -&gt; m (Condition c)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Condition c
forall c. Bool -&gt; Condition c
</span><a href="Distribution.Types.Condition.html#Lit"><span class="hs-identifier hs-var">Lit</span></a></span><span>  </span><span class="annot"><span class="annottext">m Bool
forall a (m :: * -&gt; *). (Parsec a, CabalParsing m) =&gt; m a
</span><a href="Distribution.Parsec.html#parsec"><span class="hs-identifier hs-var">parsec</span></a></span><span>
</span><span id="line-120"></span><span>    </span><span id="local-6989586621679695059"><span class="annot"><span class="annottext">archIdent :: m ConfVar
</span><a href="#local-6989586621679695059"><span class="hs-identifier hs-var hs-var">archIdent</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Arch -&gt; ConfVar) -&gt; m Arch -&gt; m ConfVar
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">Arch -&gt; ConfVar
</span><a href="Distribution.Types.ConfVar.html#Arch"><span class="hs-identifier hs-var">Arch</span></a></span><span> </span><span class="annot"><span class="annottext">m Arch
forall a (m :: * -&gt; *). (Parsec a, CabalParsing m) =&gt; m a
</span><a href="Distribution.Parsec.html#parsec"><span class="hs-identifier hs-var">parsec</span></a></span><span>
</span><span id="line-121"></span><span>    </span><span id="local-6989586621679695066"><span class="annot"><span class="annottext">osIdent :: m ConfVar
</span><a href="#local-6989586621679695066"><span class="hs-identifier hs-var hs-var">osIdent</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(OS -&gt; ConfVar) -&gt; m OS -&gt; m ConfVar
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">OS -&gt; ConfVar
</span><a href="Distribution.Types.ConfVar.html#OS"><span class="hs-identifier hs-var">OS</span></a></span><span>   </span><span class="annot"><span class="annottext">m OS
forall a (m :: * -&gt; *). (Parsec a, CabalParsing m) =&gt; m a
</span><a href="Distribution.Parsec.html#parsec"><span class="hs-identifier hs-var">parsec</span></a></span><span>
</span><span id="line-122"></span><span>    </span><span id="local-6989586621679695053"><span class="annot"><span class="annottext">flagIdent :: m ConfVar
</span><a href="#local-6989586621679695053"><span class="hs-identifier hs-var hs-var">flagIdent</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; ConfVar) -&gt; m String -&gt; m ConfVar
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FlagName -&gt; ConfVar
</span><a href="Distribution.Types.ConfVar.html#PackageFlag"><span class="hs-identifier hs-var">PackageFlag</span></a></span><span> </span><span class="annot"><span class="annottext">(FlagName -&gt; ConfVar) -&gt; (String -&gt; FlagName) -&gt; String -&gt; ConfVar
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; FlagName
</span><a href="Distribution.Types.Flag.html#mkFlagName"><span class="hs-identifier hs-var">mkFlagName</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; FlagName) -&gt; (String -&gt; String) -&gt; String -&gt; FlagName
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="Distribution.Utils.Generic.html#lowercase"><span class="hs-identifier hs-var">lowercase</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; m String
forall (m :: * -&gt; *). CharParsing m =&gt; (Char -&gt; Bool) -&gt; m String
</span><a href="Distribution.Compat.CharParsing.html#munch1"><span class="hs-identifier hs-var">munch1</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679695027"><span class="hs-identifier hs-var">isIdentChar</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-123"></span><span>    </span><span id="local-6989586621679695027"><span class="annot"><span class="annottext">isIdentChar :: Char -&gt; Bool
</span><a href="#local-6989586621679695027"><span class="hs-identifier hs-var hs-var">isIdentChar</span></a></span></span><span> </span><span id="local-6989586621679695023"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679695023"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isAlphaNum"><span class="hs-identifier hs-var">isAlphaNum</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679695023"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679695023"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'_'</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679695023"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span>
</span><span id="line-124"></span><span>    </span><span id="local-6989586621679695095"><span class="annot"><span class="annottext">oper :: String -&gt; m ()
</span><a href="#local-6989586621679695095"><span class="hs-identifier hs-var hs-var">oper</span></a></span></span><span> </span><span id="local-6989586621679695017"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679695017"><span class="hs-identifier hs-var">s</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m ()
</span><a href="#local-6989586621679695089"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="annot"><span class="annottext">m () -&gt; m String -&gt; m String
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; m String
forall (m :: * -&gt; *). CharParsing m =&gt; String -&gt; m String
</span><a href="Distribution.Compat.CharParsing.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679695017"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">m String -&gt; m () -&gt; m ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">m ()
</span><a href="#local-6989586621679695089"><span class="hs-identifier hs-var">sp</span></a></span><span>
</span><span id="line-125"></span><span>    </span><span id="local-6989586621679695089"><span class="annot"><span class="annottext">sp :: m ()
</span><a href="#local-6989586621679695089"><span class="hs-identifier hs-var hs-var">sp</span></a></span></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m ()
forall (m :: * -&gt; *). CharParsing m =&gt; m ()
</span><a href="Distribution.Compat.CharParsing.html#spaces"><span class="hs-identifier hs-var">spaces</span></a></span><span>
</span><span id="line-126"></span><span>    </span><span id="local-6989586621679695047"><span class="annot"><span class="annottext">implIdent :: m ConfVar
</span><a href="#local-6989586621679695047"><span class="hs-identifier hs-var hs-var">implIdent</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621679695003"><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="#local-6989586621679695003"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">m CompilerFlavor
forall a (m :: * -&gt; *). (Parsec a, CabalParsing m) =&gt; m a
</span><a href="Distribution.Parsec.html#parsec"><span class="hs-identifier hs-var">parsec</span></a></span><span>
</span><span id="line-127"></span><span>                       </span><span id="local-6989586621679695002"><span class="annot"><span class="annottext">VersionRange
</span><a href="#local-6989586621679695002"><span class="hs-identifier hs-var">vr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">m ()
</span><a href="#local-6989586621679695089"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="annot"><span class="annottext">m () -&gt; m VersionRange -&gt; m VersionRange
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">VersionRange -&gt; m VersionRange -&gt; m VersionRange
forall (m :: * -&gt; *) a. Alternative m =&gt; a -&gt; m a -&gt; m a
</span><a href="Distribution.Compat.Parsing.html#option"><span class="hs-identifier hs-var">option</span></a></span><span> </span><span class="annot"><span class="annottext">VersionRange
</span><a href="Distribution.Types.VersionRange.Internal.html#anyVersion"><span class="hs-identifier hs-var">anyVersion</span></a></span><span> </span><span class="annot"><span class="annottext">m VersionRange
forall a (m :: * -&gt; *). (Parsec a, CabalParsing m) =&gt; m a
</span><a href="Distribution.Parsec.html#parsec"><span class="hs-identifier hs-var">parsec</span></a></span><span>
</span><span id="line-128"></span><span>                       </span><span class="annot"><span class="annottext">ConfVar -&gt; m ConfVar
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(ConfVar -&gt; m ConfVar) -&gt; ConfVar -&gt; m ConfVar
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor -&gt; VersionRange -&gt; ConfVar
</span><a href="Distribution.Types.ConfVar.html#Impl"><span class="hs-identifier hs-var">Impl</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="#local-6989586621679695003"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">VersionRange
</span><a href="#local-6989586621679695002"><span class="hs-identifier hs-var">vr</span></a></span><span>
</span><span id="line-129"></span><span>
</span><span id="line-130"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-131"></span><span>
</span><span id="line-132"></span><span class="hs-comment">-- | Result of dependency test. Isomorphic to @Maybe d@ but renamed for</span><span>
</span><span id="line-133"></span><span class="hs-comment">--   clarity.</span><span>
</span><span id="line-134"></span><span class="hs-keyword">data</span><span> </span><span id="DepTestRslt"><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#DepTestRslt"><span class="hs-identifier hs-var">DepTestRslt</span></a></span></span><span> </span><span id="local-6989586621679695452"><span class="annot"><a href="#local-6989586621679695452"><span class="hs-identifier hs-type">d</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="DepOk"><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#DepOk"><span class="hs-identifier hs-var">DepOk</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="MissingDeps"><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#MissingDeps"><span class="hs-identifier hs-var">MissingDeps</span></a></span></span><span> </span><span class="annot"><a href="#local-6989586621679695452"><span class="hs-identifier hs-type">d</span></a></span><span>
</span><span id="line-135"></span><span>
</span><span id="line-136"></span><span id="local-6989586621679695453"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679694992"><span class="annot"><a href="../../base/src/GHC.Base.html#Semigroup"><span class="hs-identifier hs-type">Semigroup</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679695453"><span class="hs-identifier hs-type">d</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#DepTestRslt"><span class="hs-identifier hs-type">DepTestRslt</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679695453"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-137"></span><span>    </span><span id="local-6989586621679694990"><span class="annot"><span class="annottext">mempty :: DepTestRslt d
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var hs-var hs-var hs-var">mempty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DepTestRslt d
forall d. DepTestRslt d
</span><a href="Distribution.PackageDescription.Configuration.html#DepOk"><span class="hs-identifier hs-var">DepOk</span></a></span><span>
</span><span id="line-138"></span><span>    </span><span id="local-6989586621679694988"><span class="annot"><span class="annottext">mappend :: DepTestRslt d -&gt; DepTestRslt d -&gt; DepTestRslt d
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-identifier hs-var hs-var hs-var hs-var">mappend</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DepTestRslt d -&gt; DepTestRslt d -&gt; DepTestRslt d
forall a. Semigroup a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">(&lt;&gt;)</span></a></span></span><span>
</span><span id="line-139"></span><span>
</span><span id="line-140"></span><span id="local-6989586621679694987"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679694982"><span id="local-6989586621679694984"><span class="annot"><a href="../../base/src/GHC.Base.html#Semigroup"><span class="hs-identifier hs-type">Semigroup</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679694987"><span class="hs-identifier hs-type">d</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Semigroup"><span class="hs-identifier hs-type">Semigroup</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#DepTestRslt"><span class="hs-identifier hs-type">DepTestRslt</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679694987"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-141"></span><span>    </span><span class="annot"><span class="annottext">DepTestRslt d
</span><a href="Distribution.PackageDescription.Configuration.html#DepOk"><span class="hs-identifier hs-var">DepOk</span></a></span><span> </span><span id="local-6989586621679694979"><span class="annot"><span class="annottext">&lt;&gt; :: DepTestRslt d -&gt; DepTestRslt d -&gt; DepTestRslt d
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;&gt;</span></a></span></span><span> </span><span id="local-6989586621679694978"><span class="annot"><span class="annottext">DepTestRslt d
</span><a href="#local-6989586621679694978"><span class="hs-identifier hs-var">x</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DepTestRslt d
</span><a href="#local-6989586621679694978"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-142"></span><span>    </span><span id="local-6989586621679694977"><span class="annot"><span class="annottext">DepTestRslt d
</span><a href="#local-6989586621679694977"><span class="hs-identifier hs-var">x</span></a></span></span><span>     </span><span class="annot"><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">DepTestRslt d
</span><a href="Distribution.PackageDescription.Configuration.html#DepOk"><span class="hs-identifier hs-var">DepOk</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DepTestRslt d
</span><a href="#local-6989586621679694977"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-143"></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#MissingDeps"><span class="hs-identifier hs-type">MissingDeps</span></a></span><span> </span><span id="local-6989586621679694976"><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679694976"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#MissingDeps"><span class="hs-identifier hs-type">MissingDeps</span></a></span><span> </span><span id="local-6989586621679694975"><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679694975"><span class="hs-identifier hs-var">d'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">d -&gt; DepTestRslt d
forall d. d -&gt; DepTestRslt d
</span><a href="Distribution.PackageDescription.Configuration.html#MissingDeps"><span class="hs-identifier hs-var">MissingDeps</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679694976"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">d -&gt; d -&gt; d
forall a. Semigroup a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679694975"><span class="hs-identifier hs-var">d'</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-144"></span><span>
</span><span id="line-145"></span><span>
</span><span id="line-146"></span><span class="hs-comment">-- | Try to find a flag assignment that satisfies the constraints of all trees.</span><span>
</span><span id="line-147"></span><span class="hs-comment">--</span><span>
</span><span id="line-148"></span><span class="hs-comment">-- Returns either the missing dependencies, or a tuple containing the</span><span>
</span><span id="line-149"></span><span class="hs-comment">-- resulting data, the associated dependencies, and the chosen flag</span><span>
</span><span id="line-150"></span><span class="hs-comment">-- assignments.</span><span>
</span><span id="line-151"></span><span class="hs-comment">--</span><span>
</span><span id="line-152"></span><span class="hs-comment">-- In case of failure, the union of the dependencies that led to backtracking</span><span>
</span><span id="line-153"></span><span class="hs-comment">-- on all branches is returned.</span><span>
</span><span id="line-154"></span><span class="hs-comment">-- [TODO: Could also be specified with a function argument.]</span><span>
</span><span id="line-155"></span><span class="hs-comment">--</span><span>
</span><span id="line-156"></span><span class="hs-comment">-- TODO: The current algorithm is rather naive.  A better approach would be to:</span><span>
</span><span id="line-157"></span><span class="hs-comment">--</span><span>
</span><span id="line-158"></span><span class="hs-comment">-- * Rule out possible paths, by taking a look at the associated dependencies.</span><span>
</span><span id="line-159"></span><span class="hs-comment">--</span><span>
</span><span id="line-160"></span><span class="hs-comment">-- * Infer the required values for the conditions of these paths, and</span><span>
</span><span id="line-161"></span><span class="hs-comment">--   calculate the required domains for the variables used in these</span><span>
</span><span id="line-162"></span><span class="hs-comment">--   conditions.  Then picking a flag assignment would be linear (I guess).</span><span>
</span><span id="line-163"></span><span class="hs-comment">--</span><span>
</span><span id="line-164"></span><span class="hs-comment">-- This would require some sort of SAT solving, though, thus it's not</span><span>
</span><span id="line-165"></span><span class="hs-comment">-- implemented unless we really need it.</span><span>
</span><span id="line-166"></span><span class="hs-comment">--</span><span>
</span><span id="line-167"></span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#resolveWithFlags"><span class="hs-identifier hs-type">resolveWithFlags</span></a></span><span> </span><span class="hs-glyph">::</span><span>
</span><span id="line-168"></span><span>     </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.Flag.html#FlagName"><span class="hs-identifier hs-type">FlagName</span></a></span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-169"></span><span>        </span><span class="hs-comment">-- ^ Domain for each flag name, will be tested in order.</span><span>
</span><span id="line-170"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentRequestedSpec.html#ComponentRequestedSpec"><span class="hs-identifier hs-type">ComponentRequestedSpec</span></a></span><span>
</span><span id="line-171"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.System.html#OS"><span class="hs-identifier hs-type">OS</span></a></span><span>      </span><span class="hs-comment">-- ^ OS as returned by Distribution.System.buildOS</span><span>
</span><span id="line-172"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.System.html#Arch"><span class="hs-identifier hs-type">Arch</span></a></span><span>    </span><span class="hs-comment">-- ^ Arch as returned by Distribution.System.buildArch</span><span>
</span><span id="line-173"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Compiler.html#CompilerInfo"><span class="hs-identifier hs-type">CompilerInfo</span></a></span><span>  </span><span class="hs-comment">-- ^ Compiler information</span><span>
</span><span id="line-174"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.PackageVersionConstraint.html#PackageVersionConstraint"><span class="hs-identifier hs-type">PackageVersionConstraint</span></a></span><span class="hs-special">]</span><span>  </span><span class="hs-comment">-- ^ Additional constraints</span><span>
</span><span id="line-175"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.CondTree.html#CondTree"><span class="hs-identifier hs-type">CondTree</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.ConfVar.html#ConfVar"><span class="hs-identifier hs-type">ConfVar</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.Dependency.html#Dependency"><span class="hs-identifier hs-type">Dependency</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#PDTagged"><span class="hs-identifier hs-type">PDTagged</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-176"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.Dependency.html#Dependency"><span class="hs-identifier hs-type">Dependency</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#DepTestRslt"><span class="hs-identifier hs-type">DepTestRslt</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.Dependency.html#Dependency"><span class="hs-identifier hs-type">Dependency</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>  </span><span class="hs-comment">-- ^ Dependency test function.</span><span>
</span><span id="line-177"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.Dependency.html#Dependency"><span class="hs-identifier hs-type">Dependency</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#TargetSet"><span class="hs-identifier hs-type">TargetSet</span></a></span><span> </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#PDTagged"><span class="hs-identifier hs-type">PDTagged</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Types.Flag.html#FlagAssignment"><span class="hs-identifier hs-type">FlagAssignment</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-178"></span><span>       </span><span class="hs-comment">-- ^ Either the missing dependencies (error case), or a pair of</span><span>
</span><span id="line-179"></span><span>       </span><span class="hs-comment">-- (set of build targets with dependencies, chosen flag assignments)</span><span>
</span><span id="line-180"></span><span id="resolveWithFlags"><span class="annot"><span class="annottext">resolveWithFlags :: [(FlagName, [Bool])]
-&gt; ComponentRequestedSpec
-&gt; OS
-&gt; Arch
-&gt; CompilerInfo
-&gt; [PackageVersionConstraint]
-&gt; [CondTree ConfVar [Dependency] PDTagged]
-&gt; ([Dependency] -&gt; DepTestRslt [Dependency])
-&gt; Either [Dependency] (TargetSet PDTagged, FlagAssignment)
</span><a href="Distribution.PackageDescription.Configuration.html#resolveWithFlags"><span class="hs-identifier hs-var hs-var">resolveWithFlags</span></a></span></span><span> </span><span id="local-6989586621679694973"><span class="annot"><span class="annottext">[(FlagName, [Bool])]
</span><a href="#local-6989586621679694973"><span class="hs-identifier hs-var">dom</span></a></span></span><span> </span><span id="local-6989586621679694972"><span class="annot"><span class="annottext">ComponentRequestedSpec
</span><a href="#local-6989586621679694972"><span class="hs-identifier hs-var">enabled</span></a></span></span><span> </span><span id="local-6989586621679694971"><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679694971"><span class="hs-identifier hs-var">os</span></a></span></span><span> </span><span id="local-6989586621679694970"><span class="annot"><span class="annottext">Arch
</span><a href="#local-6989586621679694970"><span class="hs-identifier hs-var">arch</span></a></span></span><span> </span><span id="local-6989586621679694969"><span class="annot"><span class="annottext">CompilerInfo
</span><a href="#local-6989586621679694969"><span class="hs-identifier hs-var">impl</span></a></span></span><span> </span><span id="local-6989586621679694968"><span class="annot"><span class="annottext">[PackageVersionConstraint]
</span><a href="#local-6989586621679694968"><span class="hs-identifier hs-var">constrs</span></a></span></span><span> </span><span id="local-6989586621679694967"><span class="annot"><span class="annottext">[CondTree ConfVar [Dependency] PDTagged]
</span><a href="#local-6989586621679694967"><span class="hs-identifier hs-var">trees</span></a></span></span><span> </span><span id="local-6989586621679694966"><span class="annot"><span class="annottext">[Dependency] -&gt; DepTestRslt [Dependency]
</span><a href="#local-6989586621679694966"><span class="hs-identifier hs-var">checkDeps</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-181"></span><span>    </span><span class="annot"><span class="annottext">(DepMapUnion
 -&gt; Either [Dependency] (TargetSet PDTagged, FlagAssignment))
-&gt; ((TargetSet PDTagged, FlagAssignment)
    -&gt; Either [Dependency] (TargetSet PDTagged, FlagAssignment))
-&gt; Either DepMapUnion (TargetSet PDTagged, FlagAssignment)
-&gt; Either [Dependency] (TargetSet PDTagged, FlagAssignment)
forall a c b. (a -&gt; c) -&gt; (b -&gt; c) -&gt; Either a b -&gt; c
</span><a href="../../base/src/Data.Either.html#either"><span class="hs-identifier hs-var">either</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Dependency]
-&gt; Either [Dependency] (TargetSet PDTagged, FlagAssignment)
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">([Dependency]
 -&gt; Either [Dependency] (TargetSet PDTagged, FlagAssignment))
-&gt; (DepMapUnion -&gt; [Dependency])
-&gt; DepMapUnion
-&gt; Either [Dependency] (TargetSet PDTagged, FlagAssignment)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">DepMapUnion -&gt; [Dependency]
</span><a href="Distribution.PackageDescription.Configuration.html#fromDepMapUnion"><span class="hs-identifier hs-var">fromDepMapUnion</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(TargetSet PDTagged, FlagAssignment)
-&gt; Either [Dependency] (TargetSet PDTagged, FlagAssignment)
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">(Either DepMapUnion (TargetSet PDTagged, FlagAssignment)
 -&gt; Either [Dependency] (TargetSet PDTagged, FlagAssignment))
-&gt; Either DepMapUnion (TargetSet PDTagged, FlagAssignment)
-&gt; Either [Dependency] (TargetSet PDTagged, FlagAssignment)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Tree FlagAssignment
-&gt; Either DepMapUnion (TargetSet PDTagged, FlagAssignment)
</span><a href="#local-6989586621679694963"><span class="hs-identifier hs-var">explore</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FlagAssignment -&gt; [(FlagName, [Bool])] -&gt; Tree FlagAssignment
</span><a href="#local-6989586621679694962"><span class="hs-identifier hs-var">build</span></a></span><span> </span><span class="annot"><span class="annottext">FlagAssignment
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="annot"><span class="annottext">[(FlagName, [Bool])]
</span><a href="#local-6989586621679694973"><span class="hs-identifier hs-var">dom</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-182"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-183"></span><span>    </span><span class="hs-comment">-- simplify trees by (partially) evaluating all conditions and converting</span><span>
</span><span id="line-184"></span><span>    </span><span class="hs-comment">-- dependencies to dependency maps.</span><span>
</span><span id="line-185"></span><span>    </span><span class="annot"><a href="#local-6989586621679694961"><span class="hs-identifier hs-type">simplifiedTrees</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.CondTree.html#CondTree"><span class="hs-identifier hs-type">CondTree</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.Flag.html#FlagName"><span class="hs-identifier hs-type">FlagName</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.DependencyMap.html#DependencyMap"><span class="hs-identifier hs-type">DependencyMap</span></a></span><span> </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#PDTagged"><span class="hs-identifier hs-type">PDTagged</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-186"></span><span>    </span><span id="local-6989586621679694961"><span class="annot"><span class="annottext">simplifiedTrees :: [CondTree FlagName DependencyMap PDTagged]
</span><a href="#local-6989586621679694961"><span class="hs-identifier hs-var hs-var">simplifiedTrees</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CondTree ConfVar [Dependency] PDTagged
 -&gt; CondTree FlagName DependencyMap PDTagged)
-&gt; [CondTree ConfVar [Dependency] PDTagged]
-&gt; [CondTree FlagName DependencyMap PDTagged]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">([Dependency] -&gt; DependencyMap)
-&gt; CondTree FlagName [Dependency] PDTagged
-&gt; CondTree FlagName DependencyMap PDTagged
forall c d v a. (c -&gt; d) -&gt; CondTree v c a -&gt; CondTree v d a
</span><a href="Distribution.Types.CondTree.html#mapTreeConstrs"><span class="hs-identifier hs-var">mapTreeConstrs</span></a></span><span> </span><span class="annot"><span class="annottext">[Dependency] -&gt; DependencyMap
</span><a href="Distribution.Types.DependencyMap.html#toDepMap"><span class="hs-identifier hs-var">toDepMap</span></a></span><span>  </span><span class="hs-comment">-- convert to maps</span><span>
</span><span id="line-187"></span><span>                          </span><span class="annot"><span class="annottext">(CondTree FlagName [Dependency] PDTagged
 -&gt; CondTree FlagName DependencyMap PDTagged)
-&gt; (CondTree ConfVar [Dependency] PDTagged
    -&gt; CondTree FlagName [Dependency] PDTagged)
-&gt; CondTree ConfVar [Dependency] PDTagged
-&gt; CondTree FlagName DependencyMap PDTagged
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">CondTree FlagName [Dependency] PDTagged
-&gt; CondTree FlagName [Dependency] PDTagged
forall v c.
(Eq v, Monoid c) =&gt;
CondTree v c PDTagged -&gt; CondTree v c PDTagged
</span><a href="Distribution.PackageDescription.Configuration.html#addBuildableConditionPDTagged"><span class="hs-identifier hs-var">addBuildableConditionPDTagged</span></a></span><span>
</span><span id="line-188"></span><span>                          </span><span class="annot"><span class="annottext">(CondTree FlagName [Dependency] PDTagged
 -&gt; CondTree FlagName [Dependency] PDTagged)
-&gt; (CondTree ConfVar [Dependency] PDTagged
    -&gt; CondTree FlagName [Dependency] PDTagged)
-&gt; CondTree ConfVar [Dependency] PDTagged
-&gt; CondTree FlagName [Dependency] PDTagged
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(Condition ConfVar -&gt; Condition FlagName)
-&gt; CondTree ConfVar [Dependency] PDTagged
-&gt; CondTree FlagName [Dependency] PDTagged
forall v w c a.
(Condition v -&gt; Condition w) -&gt; CondTree v c a -&gt; CondTree w c a
</span><a href="Distribution.Types.CondTree.html#mapTreeConds"><span class="hs-identifier hs-var">mapTreeConds</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Condition FlagName, [FlagName]) -&gt; Condition FlagName
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span> </span><span class="annot"><span class="annottext">((Condition FlagName, [FlagName]) -&gt; Condition FlagName)
-&gt; (Condition ConfVar -&gt; (Condition FlagName, [FlagName]))
-&gt; Condition ConfVar
-&gt; Condition FlagName
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">OS
-&gt; Arch
-&gt; CompilerInfo
-&gt; Condition ConfVar
-&gt; (Condition FlagName, [FlagName])
</span><a href="Distribution.PackageDescription.Configuration.html#simplifyWithSysParams"><span class="hs-identifier hs-var">simplifyWithSysParams</span></a></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679694971"><span class="hs-identifier hs-var">os</span></a></span><span> </span><span class="annot"><span class="annottext">Arch
</span><a href="#local-6989586621679694970"><span class="hs-identifier hs-var">arch</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerInfo
</span><a href="#local-6989586621679694969"><span class="hs-identifier hs-var">impl</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-189"></span><span>                          </span><span class="annot"><span class="annottext">[CondTree ConfVar [Dependency] PDTagged]
</span><a href="#local-6989586621679694967"><span class="hs-identifier hs-var">trees</span></a></span><span>
</span><span id="line-190"></span><span>
</span><span id="line-191"></span><span>    </span><span class="hs-comment">-- @explore@ searches a tree of assignments, backtracking whenever a flag</span><span>
</span><span id="line-192"></span><span>    </span><span class="hs-comment">-- introduces a dependency that cannot be satisfied.  If there is no</span><span>
</span><span id="line-193"></span><span>    </span><span class="hs-comment">-- solution, @explore@ returns the union of all dependencies that caused</span><span>
</span><span id="line-194"></span><span>    </span><span class="hs-comment">-- it to backtrack.  Since the tree is constructed lazily, we avoid some</span><span>
</span><span id="line-195"></span><span>    </span><span class="hs-comment">-- computation overhead in the successful case.</span><span>
</span><span id="line-196"></span><span>    </span><span class="annot"><a href="#local-6989586621679694963"><span class="hs-identifier hs-type">explore</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../containers/src/Data.Tree.html#Tree"><span class="hs-identifier hs-type">Tree</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.Flag.html#FlagAssignment"><span class="hs-identifier hs-type">FlagAssignment</span></a></span><span>
</span><span id="line-197"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#DepMapUnion"><span class="hs-identifier hs-type">DepMapUnion</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#TargetSet"><span class="hs-identifier hs-type">TargetSet</span></a></span><span> </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#PDTagged"><span class="hs-identifier hs-type">PDTagged</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Types.Flag.html#FlagAssignment"><span class="hs-identifier hs-type">FlagAssignment</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-198"></span><span>    </span><span id="local-6989586621679694963"><span class="annot"><span class="annottext">explore :: Tree FlagAssignment
-&gt; Either DepMapUnion (TargetSet PDTagged, FlagAssignment)
</span><a href="#local-6989586621679694963"><span class="hs-identifier hs-var hs-var">explore</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.Tree.html#Node"><span class="hs-identifier hs-type">Node</span></a></span><span> </span><span id="local-6989586621679694958"><span class="annot"><span class="annottext">FlagAssignment
</span><a href="#local-6989586621679694958"><span class="hs-identifier hs-var">flags</span></a></span></span><span> </span><span id="local-6989586621679694957"><span class="annot"><span class="annottext">[Tree FlagAssignment]
</span><a href="#local-6989586621679694957"><span class="hs-identifier hs-var">ts</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-199"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679694951"><span class="annot"><span class="annottext">targetSet :: TargetSet PDTagged
</span><a href="#local-6989586621679694951"><span class="hs-identifier hs-var hs-var">targetSet</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(DependencyMap, PDTagged)] -&gt; TargetSet PDTagged
forall a. [(DependencyMap, a)] -&gt; TargetSet a
</span><a href="Distribution.PackageDescription.Configuration.html#TargetSet"><span class="hs-identifier hs-var">TargetSet</span></a></span><span> </span><span class="annot"><span class="annottext">([(DependencyMap, PDTagged)] -&gt; TargetSet PDTagged)
-&gt; [(DependencyMap, PDTagged)] -&gt; TargetSet PDTagged
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">((CondTree FlagName DependencyMap PDTagged
  -&gt; (DependencyMap, PDTagged))
 -&gt; [CondTree FlagName DependencyMap PDTagged]
 -&gt; [(DependencyMap, PDTagged)])
-&gt; [CondTree FlagName DependencyMap PDTagged]
-&gt; (CondTree FlagName DependencyMap PDTagged
    -&gt; (DependencyMap, PDTagged))
-&gt; [(DependencyMap, PDTagged)]
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">(CondTree FlagName DependencyMap PDTagged
 -&gt; (DependencyMap, PDTagged))
-&gt; [CondTree FlagName DependencyMap PDTagged]
-&gt; [(DependencyMap, PDTagged)]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">[CondTree FlagName DependencyMap PDTagged]
</span><a href="#local-6989586621679694961"><span class="hs-identifier hs-var">simplifiedTrees</span></a></span><span> </span><span class="annot"><span class="annottext">((CondTree FlagName DependencyMap PDTagged
  -&gt; (DependencyMap, PDTagged))
 -&gt; [(DependencyMap, PDTagged)])
-&gt; (CondTree FlagName DependencyMap PDTagged
    -&gt; (DependencyMap, PDTagged))
-&gt; [(DependencyMap, PDTagged)]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-200"></span><span>                </span><span class="hs-comment">-- apply additional constraints to all dependencies</span><span>
</span><span id="line-201"></span><span>                </span><span class="annot"><span class="annottext">(DependencyMap -&gt; DependencyMap)
-&gt; (DependencyMap, PDTagged) -&gt; (DependencyMap, PDTagged)
forall (a :: * -&gt; * -&gt; *) b c d.
Arrow a =&gt;
a b c -&gt; a (b, d) (c, d)
</span><a href="../../base/src/Control.Arrow.html#first"><span class="hs-identifier hs-var">first</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DependencyMap -&gt; [PackageVersionConstraint] -&gt; DependencyMap
</span><a href="Distribution.Types.DependencyMap.html#constrainBy"><span class="hs-operator hs-var">`constrainBy`</span></a></span><span> </span><span class="annot"><span class="annottext">[PackageVersionConstraint]
</span><a href="#local-6989586621679694968"><span class="hs-identifier hs-var">constrs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">((DependencyMap, PDTagged) -&gt; (DependencyMap, PDTagged))
-&gt; (CondTree FlagName DependencyMap PDTagged
    -&gt; (DependencyMap, PDTagged))
-&gt; CondTree FlagName DependencyMap PDTagged
-&gt; (DependencyMap, PDTagged)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span>
</span><span id="line-202"></span><span>                </span><span class="annot"><span class="annottext">(FlagName -&gt; Either FlagName Bool)
-&gt; CondTree FlagName DependencyMap PDTagged
-&gt; (DependencyMap, PDTagged)
forall a d v.
(Semigroup a, Semigroup d) =&gt;
(v -&gt; Either v Bool) -&gt; CondTree v d a -&gt; (d, a)
</span><a href="Distribution.Types.CondTree.html#simplifyCondTree"><span class="hs-identifier hs-var">simplifyCondTree</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FlagAssignment -&gt; FlagName -&gt; Either FlagName Bool
</span><a href="#local-6989586621679694946"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">FlagAssignment
</span><a href="#local-6989586621679694958"><span class="hs-identifier hs-var">flags</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-203"></span><span>            </span><span id="local-6989586621679694945"><span class="annot"><span class="annottext">deps :: DependencyMap
</span><a href="#local-6989586621679694945"><span class="hs-identifier hs-var hs-var">deps</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentRequestedSpec -&gt; TargetSet PDTagged -&gt; DependencyMap
</span><a href="Distribution.PackageDescription.Configuration.html#overallDependencies"><span class="hs-identifier hs-var">overallDependencies</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentRequestedSpec
</span><a href="#local-6989586621679694972"><span class="hs-identifier hs-var">enabled</span></a></span><span> </span><span class="annot"><span class="annottext">TargetSet PDTagged
</span><a href="#local-6989586621679694951"><span class="hs-identifier hs-var">targetSet</span></a></span><span>
</span><span id="line-204"></span><span>        </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[Dependency] -&gt; DepTestRslt [Dependency]
</span><a href="#local-6989586621679694966"><span class="hs-identifier hs-var">checkDeps</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DependencyMap -&gt; [Dependency]
</span><a href="Distribution.Types.DependencyMap.html#fromDepMap"><span class="hs-identifier hs-var">fromDepMap</span></a></span><span> </span><span class="annot"><span class="annottext">DependencyMap
</span><a href="#local-6989586621679694945"><span class="hs-identifier hs-var">deps</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-205"></span><span>             </span><span class="annot"><span class="annottext">DepTestRslt [Dependency]
</span><a href="Distribution.PackageDescription.Configuration.html#DepOk"><span class="hs-identifier hs-var">DepOk</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[Tree FlagAssignment] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[Tree FlagAssignment]
</span><a href="#local-6989586621679694957"><span class="hs-identifier hs-var">ts</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(TargetSet PDTagged, FlagAssignment)
-&gt; Either DepMapUnion (TargetSet PDTagged, FlagAssignment)
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TargetSet PDTagged
</span><a href="#local-6989586621679694951"><span class="hs-identifier hs-var">targetSet</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FlagAssignment
</span><a href="#local-6989586621679694958"><span class="hs-identifier hs-var">flags</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-206"></span><span>                   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Either DepMapUnion (TargetSet PDTagged, FlagAssignment)]
-&gt; Either DepMapUnion (TargetSet PDTagged, FlagAssignment)
forall a. [Either DepMapUnion a] -&gt; Either DepMapUnion a
</span><a href="#local-6989586621679694941"><span class="hs-identifier hs-var">tryAll</span></a></span><span> </span><span class="annot"><span class="annottext">([Either DepMapUnion (TargetSet PDTagged, FlagAssignment)]
 -&gt; Either DepMapUnion (TargetSet PDTagged, FlagAssignment))
-&gt; [Either DepMapUnion (TargetSet PDTagged, FlagAssignment)]
-&gt; Either DepMapUnion (TargetSet PDTagged, FlagAssignment)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Tree FlagAssignment
 -&gt; Either DepMapUnion (TargetSet PDTagged, FlagAssignment))
-&gt; [Tree FlagAssignment]
-&gt; [Either DepMapUnion (TargetSet PDTagged, FlagAssignment)]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Tree FlagAssignment
-&gt; Either DepMapUnion (TargetSet PDTagged, FlagAssignment)
</span><a href="#local-6989586621679694963"><span class="hs-identifier hs-var">explore</span></a></span><span> </span><span class="annot"><span class="annottext">[Tree FlagAssignment]
</span><a href="#local-6989586621679694957"><span class="hs-identifier hs-var">ts</span></a></span><span>
</span><span id="line-207"></span><span>             </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#MissingDeps"><span class="hs-identifier hs-type">MissingDeps</span></a></span><span> </span><span id="local-6989586621679694940"><span class="annot"><span class="annottext">[Dependency]
</span><a href="#local-6989586621679694940"><span class="hs-identifier hs-var">mds</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">DepMapUnion
-&gt; Either DepMapUnion (TargetSet PDTagged, FlagAssignment)
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Dependency] -&gt; DepMapUnion
</span><a href="Distribution.PackageDescription.Configuration.html#toDepMapUnion"><span class="hs-identifier hs-var">toDepMapUnion</span></a></span><span> </span><span class="annot"><span class="annottext">[Dependency]
</span><a href="#local-6989586621679694940"><span class="hs-identifier hs-var">mds</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-208"></span><span>
</span><span id="line-209"></span><span>    </span><span class="hs-comment">-- Builds a tree of all possible flag assignments.  Internal nodes</span><span>
</span><span id="line-210"></span><span>    </span><span class="hs-comment">-- have only partial assignments.</span><span>
</span><span id="line-211"></span><span>    </span><span class="annot"><a href="#local-6989586621679694962"><span class="hs-identifier hs-type">build</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.Flag.html#FlagAssignment"><span class="hs-identifier hs-type">FlagAssignment</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.Flag.html#FlagName"><span class="hs-identifier hs-type">FlagName</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../containers/src/Data.Tree.html#Tree"><span class="hs-identifier hs-type">Tree</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.Flag.html#FlagAssignment"><span class="hs-identifier hs-type">FlagAssignment</span></a></span><span>
</span><span id="line-212"></span><span>    </span><span id="local-6989586621679694962"><span class="annot"><span class="annottext">build :: FlagAssignment -&gt; [(FlagName, [Bool])] -&gt; Tree FlagAssignment
</span><a href="#local-6989586621679694962"><span class="hs-identifier hs-var hs-var">build</span></a></span></span><span> </span><span id="local-6989586621679694938"><span class="annot"><span class="annottext">FlagAssignment
</span><a href="#local-6989586621679694938"><span class="hs-identifier hs-var">assigned</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FlagAssignment -&gt; [Tree FlagAssignment] -&gt; Tree FlagAssignment
forall a. a -&gt; [Tree a] -&gt; Tree a
</span><a href="../../containers/src/Data.Tree.html#Node"><span class="hs-identifier hs-var">Node</span></a></span><span> </span><span class="annot"><span class="annottext">FlagAssignment
</span><a href="#local-6989586621679694938"><span class="hs-identifier hs-var">assigned</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-213"></span><span>    </span><span class="annot"><a href="#local-6989586621679694962"><span class="hs-identifier hs-var">build</span></a></span><span> </span><span id="local-6989586621679694937"><span class="annot"><span class="annottext">FlagAssignment
</span><a href="#local-6989586621679694937"><span class="hs-identifier hs-var">assigned</span></a></span></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span id="local-6989586621679694936"><span class="annot"><span class="annottext">FlagName
</span><a href="#local-6989586621679694936"><span class="hs-identifier hs-var">fn</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679694935"><span class="annot"><span class="annottext">[Bool]
</span><a href="#local-6989586621679694935"><span class="hs-identifier hs-var">vals</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621679694934"><span class="annot"><span class="annottext">[(FlagName, [Bool])]
</span><a href="#local-6989586621679694934"><span class="hs-identifier hs-var">unassigned</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-214"></span><span>        </span><span class="annot"><span class="annottext">FlagAssignment -&gt; [Tree FlagAssignment] -&gt; Tree FlagAssignment
forall a. a -&gt; [Tree a] -&gt; Tree a
</span><a href="../../containers/src/Data.Tree.html#Node"><span class="hs-identifier hs-var">Node</span></a></span><span> </span><span class="annot"><span class="annottext">FlagAssignment
</span><a href="#local-6989586621679694937"><span class="hs-identifier hs-var">assigned</span></a></span><span> </span><span class="annot"><span class="annottext">([Tree FlagAssignment] -&gt; Tree FlagAssignment)
-&gt; [Tree FlagAssignment] -&gt; Tree FlagAssignment
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Tree FlagAssignment) -&gt; [Bool] -&gt; [Tree FlagAssignment]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679694933"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679694933"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FlagAssignment -&gt; [(FlagName, [Bool])] -&gt; Tree FlagAssignment
</span><a href="#local-6989586621679694962"><span class="hs-identifier hs-var">build</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FlagName -&gt; Bool -&gt; FlagAssignment -&gt; FlagAssignment
</span><a href="Distribution.Types.Flag.html#insertFlagAssignment"><span class="hs-identifier hs-var">insertFlagAssignment</span></a></span><span> </span><span class="annot"><span class="annottext">FlagName
</span><a href="#local-6989586621679694936"><span class="hs-identifier hs-var">fn</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679694933"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">FlagAssignment
</span><a href="#local-6989586621679694937"><span class="hs-identifier hs-var">assigned</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[(FlagName, [Bool])]
</span><a href="#local-6989586621679694934"><span class="hs-identifier hs-var">unassigned</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Bool]
</span><a href="#local-6989586621679694935"><span class="hs-identifier hs-var">vals</span></a></span><span>
</span><span id="line-215"></span><span>
</span><span id="line-216"></span><span>    </span><span id="local-6989586621679695413"><span class="annot"><a href="#local-6989586621679694941"><span class="hs-identifier hs-type">tryAll</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#DepMapUnion"><span class="hs-identifier hs-type">DepMapUnion</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679695413"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#DepMapUnion"><span class="hs-identifier hs-type">DepMapUnion</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679695413"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-217"></span><span>    </span><span id="local-6989586621679694941"><span class="annot"><span class="annottext">tryAll :: forall a. [Either DepMapUnion a] -&gt; Either DepMapUnion a
</span><a href="#local-6989586621679694941"><span class="hs-identifier hs-var hs-var">tryAll</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Either DepMapUnion a
 -&gt; Either DepMapUnion a -&gt; Either DepMapUnion a)
-&gt; Either DepMapUnion a
-&gt; [Either DepMapUnion a]
-&gt; Either DepMapUnion a
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="annot"><span class="annottext">Either DepMapUnion a
-&gt; Either DepMapUnion a -&gt; Either DepMapUnion a
forall a.
Either DepMapUnion a
-&gt; Either DepMapUnion a -&gt; Either DepMapUnion a
</span><a href="#local-6989586621679694929"><span class="hs-identifier hs-var">mp</span></a></span><span> </span><span class="annot"><span class="annottext">Either DepMapUnion a
forall a. Either DepMapUnion a
</span><a href="#local-6989586621679694928"><span class="hs-identifier hs-var">mz</span></a></span><span>
</span><span id="line-218"></span><span>
</span><span id="line-219"></span><span>    </span><span class="hs-comment">-- special version of `mplus' for our local purposes</span><span>
</span><span id="line-220"></span><span>    </span><span id="local-6989586621679695407"><span class="annot"><a href="#local-6989586621679694929"><span class="hs-identifier hs-type">mp</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#DepMapUnion"><span class="hs-identifier hs-type">DepMapUnion</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679695407"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#DepMapUnion"><span class="hs-identifier hs-type">DepMapUnion</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679695407"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#DepMapUnion"><span class="hs-identifier hs-type">DepMapUnion</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679695407"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-221"></span><span>    </span><span id="local-6989586621679694929"><span class="annot"><span class="annottext">mp :: forall a.
Either DepMapUnion a
-&gt; Either DepMapUnion a -&gt; Either DepMapUnion a
</span><a href="#local-6989586621679694929"><span class="hs-identifier hs-var hs-var">mp</span></a></span></span><span> </span><span id="local-6989586621679694926"><span class="annot"><span class="annottext">m :: Either DepMapUnion a
</span><a href="#local-6989586621679694926"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Either DepMapUnion a
</span><span class="hs-identifier">_</span></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Either DepMapUnion a
</span><a href="#local-6989586621679694926"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-222"></span><span>    </span><span class="annot"><a href="#local-6989586621679694929"><span class="hs-identifier hs-var">mp</span></a></span><span> </span><span class="annot"><span class="annottext">Either DepMapUnion a
</span><span class="hs-identifier">_</span></span><span>           </span><span id="local-6989586621679694925"><span class="annot"><span class="annottext">m :: Either DepMapUnion a
</span><a href="#local-6989586621679694925"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Either DepMapUnion a
</span><a href="#local-6989586621679694925"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-223"></span><span>    </span><span class="annot"><a href="#local-6989586621679694929"><span class="hs-identifier hs-var">mp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span id="local-6989586621679694924"><span class="annot"><span class="annottext">DepMapUnion
</span><a href="#local-6989586621679694924"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span id="local-6989586621679694923"><span class="annot"><span class="annottext">DepMapUnion
</span><a href="#local-6989586621679694923"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DepMapUnion -&gt; Either DepMapUnion a
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DepMapUnion
</span><a href="#local-6989586621679694924"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="annot"><span class="annottext">DepMapUnion -&gt; DepMapUnion -&gt; DepMapUnion
forall a. Semigroup a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">DepMapUnion
</span><a href="#local-6989586621679694923"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-224"></span><span>
</span><span id="line-225"></span><span>    </span><span class="hs-comment">-- `mzero'</span><span>
</span><span id="line-226"></span><span>    </span><span id="local-6989586621679695406"><span class="annot"><a href="#local-6989586621679694928"><span class="hs-identifier hs-type">mz</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#DepMapUnion"><span class="hs-identifier hs-type">DepMapUnion</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679695406"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-227"></span><span>    </span><span id="local-6989586621679694928"><span class="annot"><span class="annottext">mz :: forall a. Either DepMapUnion a
</span><a href="#local-6989586621679694928"><span class="hs-identifier hs-var hs-var">mz</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DepMapUnion -&gt; Either DepMapUnion a
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Map PackageName (VersionRange, NonEmptySet LibraryName)
-&gt; DepMapUnion
</span><a href="Distribution.PackageDescription.Configuration.html#DepMapUnion"><span class="hs-identifier hs-var">DepMapUnion</span></a></span><span> </span><span class="annot"><span class="annottext">Map PackageName (VersionRange, NonEmptySet LibraryName)
forall k a. Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#empty"><span class="hs-identifier hs-var">Map.empty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-228"></span><span>
</span><span id="line-229"></span><span>    </span><span class="annot"><a href="#local-6989586621679694946"><span class="hs-identifier hs-type">env</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.Flag.html#FlagAssignment"><span class="hs-identifier hs-type">FlagAssignment</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.Flag.html#FlagName"><span class="hs-identifier hs-type">FlagName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.Flag.html#FlagName"><span class="hs-identifier hs-type">FlagName</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-230"></span><span>    </span><span id="local-6989586621679694946"><span class="annot"><span class="annottext">env :: FlagAssignment -&gt; FlagName -&gt; Either FlagName Bool
</span><a href="#local-6989586621679694946"><span class="hs-identifier hs-var hs-var">env</span></a></span></span><span> </span><span id="local-6989586621679694920"><span class="annot"><span class="annottext">FlagAssignment
</span><a href="#local-6989586621679694920"><span class="hs-identifier hs-var">flags</span></a></span></span><span> </span><span id="local-6989586621679694919"><span class="annot"><span class="annottext">FlagName
</span><a href="#local-6989586621679694919"><span class="hs-identifier hs-var">flag</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Either FlagName Bool
-&gt; (Bool -&gt; Either FlagName Bool)
-&gt; Maybe Bool
-&gt; Either FlagName Bool
forall b a. b -&gt; (a -&gt; b) -&gt; Maybe a -&gt; b
</span><a href="../../base/src/Data.Maybe.html#maybe"><span class="hs-identifier hs-var">maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FlagName -&gt; Either FlagName Bool
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">FlagName
</span><a href="#local-6989586621679694919"><span class="hs-identifier hs-var">flag</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Either FlagName Bool
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe Bool -&gt; Either FlagName Bool)
-&gt; (FlagAssignment -&gt; Maybe Bool)
-&gt; FlagAssignment
-&gt; Either FlagName Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">FlagName -&gt; FlagAssignment -&gt; Maybe Bool
</span><a href="Distribution.Types.Flag.html#lookupFlagAssignment"><span class="hs-identifier hs-var">lookupFlagAssignment</span></a></span><span> </span><span class="annot"><span class="annottext">FlagName
</span><a href="#local-6989586621679694919"><span class="hs-identifier hs-var">flag</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">FlagAssignment
</span><a href="#local-6989586621679694920"><span class="hs-identifier hs-var">flags</span></a></span><span>
</span><span id="line-231"></span><span>
</span><span id="line-232"></span><span class="hs-comment">-- | Transforms a 'CondTree' by putting the input under the &quot;then&quot; branch of a</span><span>
</span><span id="line-233"></span><span class="hs-comment">-- conditional that is True when Buildable is True. If 'addBuildableCondition'</span><span>
</span><span id="line-234"></span><span class="hs-comment">-- can determine that Buildable is always True, it returns the input unchanged.</span><span>
</span><span id="line-235"></span><span class="hs-comment">-- If Buildable is always False, it returns the empty 'CondTree'.</span><span>
</span><span id="line-236"></span><span id="local-6989586621679695396"><span id="local-6989586621679695397"><span id="local-6989586621679695398"><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#addBuildableCondition"><span class="hs-identifier hs-type">addBuildableCondition</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="annot"><a href="#local-6989586621679695398"><span class="hs-identifier hs-type">v</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679695397"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679695396"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679695397"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.BuildInfo.html#BuildInfo"><span class="hs-identifier hs-type">BuildInfo</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-237"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.CondTree.html#CondTree"><span class="hs-identifier hs-type">CondTree</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679695398"><span class="hs-identifier hs-type">v</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679695396"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679695397"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-238"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.CondTree.html#CondTree"><span class="hs-identifier hs-type">CondTree</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679695398"><span class="hs-identifier hs-type">v</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679695396"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679695397"><span class="hs-identifier hs-type">a</span></a></span></span></span></span><span>
</span><span id="line-239"></span><span id="addBuildableCondition"><span class="annot"><span class="annottext">addBuildableCondition :: forall v a c.
(Eq v, Monoid a, Monoid c) =&gt;
(a -&gt; BuildInfo) -&gt; CondTree v c a -&gt; CondTree v c a
</span><a href="Distribution.PackageDescription.Configuration.html#addBuildableCondition"><span class="hs-identifier hs-var hs-var">addBuildableCondition</span></a></span></span><span> </span><span id="local-6989586621679694908"><span class="annot"><span class="annottext">a -&gt; BuildInfo
</span><a href="#local-6989586621679694908"><span class="hs-identifier hs-var">getInfo</span></a></span></span><span> </span><span id="local-6989586621679694907"><span class="annot"><span class="annottext">CondTree v c a
</span><a href="#local-6989586621679694907"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-240"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(a -&gt; Bool) -&gt; CondTree v c a -&gt; Condition v
forall v a c. Eq v =&gt; (a -&gt; Bool) -&gt; CondTree v c a -&gt; Condition v
</span><a href="Distribution.Types.CondTree.html#extractCondition"><span class="hs-identifier hs-var">extractCondition</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; Bool
</span><a href="Distribution.Types.BuildInfo.html#buildable"><span class="hs-identifier hs-var hs-var">buildable</span></a></span><span> </span><span class="annot"><span class="annottext">(BuildInfo -&gt; Bool) -&gt; (a -&gt; BuildInfo) -&gt; a -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; BuildInfo
</span><a href="#local-6989586621679694908"><span class="hs-identifier hs-var">getInfo</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CondTree v c a
</span><a href="#local-6989586621679694907"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-241"></span><span>    </span><span class="annot"><a href="Distribution.Types.Condition.html#Lit"><span class="hs-identifier hs-type">Lit</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CondTree v c a
</span><a href="#local-6989586621679694907"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-242"></span><span>    </span><span class="annot"><a href="Distribution.Types.Condition.html#Lit"><span class="hs-identifier hs-type">Lit</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; c -&gt; [CondBranch v c a] -&gt; CondTree v c a
forall v c a. a -&gt; c -&gt; [CondBranch v c a] -&gt; CondTree v c a
</span><a href="Distribution.Types.CondTree.html#CondNode"><span class="hs-identifier hs-var">CondNode</span></a></span><span> </span><span class="annot"><span class="annottext">a
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="annot"><span class="annottext">c
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-243"></span><span>    </span><span id="local-6989586621679694904"><span class="annot"><span class="annottext">Condition v
</span><a href="#local-6989586621679694904"><span class="hs-identifier hs-var">c</span></a></span></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; c -&gt; [CondBranch v c a] -&gt; CondTree v c a
forall v c a. a -&gt; c -&gt; [CondBranch v c a] -&gt; CondTree v c a
</span><a href="Distribution.Types.CondTree.html#CondNode"><span class="hs-identifier hs-var">CondNode</span></a></span><span> </span><span class="annot"><span class="annottext">a
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="annot"><span class="annottext">c
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Condition v -&gt; CondTree v c a -&gt; CondBranch v c a
forall v c a. Condition v -&gt; CondTree v c a -&gt; CondBranch v c a
</span><a href="Distribution.Types.CondTree.html#condIfThen"><span class="hs-identifier hs-var">condIfThen</span></a></span><span> </span><span class="annot"><span class="annottext">Condition v
</span><a href="#local-6989586621679694904"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">CondTree v c a
</span><a href="#local-6989586621679694907"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-244"></span><span>
</span><span id="line-245"></span><span class="hs-comment">-- | This is a special version of 'addBuildableCondition' for the 'PDTagged'</span><span>
</span><span id="line-246"></span><span class="hs-comment">-- type.</span><span>
</span><span id="line-247"></span><span class="hs-comment">--</span><span>
</span><span id="line-248"></span><span class="hs-comment">-- It is not simply a specialisation. It is more complicated than it</span><span>
</span><span id="line-249"></span><span class="hs-comment">-- ought to be because of the way the 'PDTagged' monoid instance works. The</span><span>
</span><span id="line-250"></span><span class="hs-comment">-- @mempty = 'PDNull'@ forgets the component type, which has the effect of</span><span>
</span><span id="line-251"></span><span class="hs-comment">-- completely deleting components that are not buildable.</span><span>
</span><span id="line-252"></span><span class="hs-comment">--</span><span>
</span><span id="line-253"></span><span class="hs-comment">-- See &lt;https://github.com/haskell/cabal/pull/4094&gt; for more details.</span><span>
</span><span id="line-254"></span><span class="hs-comment">--</span><span>
</span><span id="line-255"></span><span id="local-6989586621679695434"><span id="local-6989586621679695435"><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#addBuildableConditionPDTagged"><span class="hs-identifier hs-type">addBuildableConditionPDTagged</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="annot"><a href="#local-6989586621679695435"><span class="hs-identifier hs-type">v</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679695434"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span>
</span><span id="line-256"></span><span>                                 </span><span class="annot"><a href="Distribution.Types.CondTree.html#CondTree"><span class="hs-identifier hs-type">CondTree</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679695435"><span class="hs-identifier hs-type">v</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679695434"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#PDTagged"><span class="hs-identifier hs-type">PDTagged</span></a></span><span>
</span><span id="line-257"></span><span>                              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.CondTree.html#CondTree"><span class="hs-identifier hs-type">CondTree</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679695435"><span class="hs-identifier hs-type">v</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679695434"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#PDTagged"><span class="hs-identifier hs-type">PDTagged</span></a></span></span></span><span>
</span><span id="line-258"></span><span id="addBuildableConditionPDTagged"><span class="annot"><span class="annottext">addBuildableConditionPDTagged :: forall v c.
(Eq v, Monoid c) =&gt;
CondTree v c PDTagged -&gt; CondTree v c PDTagged
</span><a href="Distribution.PackageDescription.Configuration.html#addBuildableConditionPDTagged"><span class="hs-identifier hs-var hs-var">addBuildableConditionPDTagged</span></a></span></span><span> </span><span id="local-6989586621679694895"><span class="annot"><span class="annottext">CondTree v c PDTagged
</span><a href="#local-6989586621679694895"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-259"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(PDTagged -&gt; Bool) -&gt; CondTree v c PDTagged -&gt; Condition v
forall v a c. Eq v =&gt; (a -&gt; Bool) -&gt; CondTree v c a -&gt; Condition v
</span><a href="Distribution.Types.CondTree.html#extractCondition"><span class="hs-identifier hs-var">extractCondition</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; Bool
</span><a href="Distribution.Types.BuildInfo.html#buildable"><span class="hs-identifier hs-var hs-var">buildable</span></a></span><span> </span><span class="annot"><span class="annottext">(BuildInfo -&gt; Bool) -&gt; (PDTagged -&gt; BuildInfo) -&gt; PDTagged -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">PDTagged -&gt; BuildInfo
</span><a href="#local-6989586621679694894"><span class="hs-identifier hs-var">getInfo</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CondTree v c PDTagged
</span><a href="#local-6989586621679694895"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-260"></span><span>      </span><span class="annot"><a href="Distribution.Types.Condition.html#Lit"><span class="hs-identifier hs-type">Lit</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CondTree v c PDTagged
</span><a href="#local-6989586621679694895"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-261"></span><span>      </span><span class="annot"><a href="Distribution.Types.Condition.html#Lit"><span class="hs-identifier hs-type">Lit</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CondTree v c PDTagged -&gt; CondTree v c PDTagged
forall {v} {c} {a}. CondTree v c a -&gt; CondTree v c a
</span><a href="#local-6989586621679694893"><span class="hs-identifier hs-var">deleteConstraints</span></a></span><span> </span><span class="annot"><span class="annottext">CondTree v c PDTagged
</span><a href="#local-6989586621679694895"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-262"></span><span>      </span><span id="local-6989586621679694892"><span class="annot"><span class="annottext">Condition v
</span><a href="#local-6989586621679694892"><span class="hs-identifier hs-var">c</span></a></span></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">PDTagged -&gt; c -&gt; [CondBranch v c PDTagged] -&gt; CondTree v c PDTagged
forall v c a. a -&gt; c -&gt; [CondBranch v c a] -&gt; CondTree v c a
</span><a href="Distribution.Types.CondTree.html#CondNode"><span class="hs-identifier hs-var">CondNode</span></a></span><span> </span><span class="annot"><span class="annottext">PDTagged
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="annot"><span class="annottext">c
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Condition v
-&gt; CondTree v c PDTagged
-&gt; CondTree v c PDTagged
-&gt; CondBranch v c PDTagged
forall v c a.
Condition v -&gt; CondTree v c a -&gt; CondTree v c a -&gt; CondBranch v c a
</span><a href="Distribution.Types.CondTree.html#condIfThenElse"><span class="hs-identifier hs-var">condIfThenElse</span></a></span><span> </span><span class="annot"><span class="annottext">Condition v
</span><a href="#local-6989586621679694892"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">CondTree v c PDTagged
</span><a href="#local-6989586621679694895"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CondTree v c PDTagged -&gt; CondTree v c PDTagged
forall {v} {c} {a}. CondTree v c a -&gt; CondTree v c a
</span><a href="#local-6989586621679694893"><span class="hs-identifier hs-var">deleteConstraints</span></a></span><span> </span><span class="annot"><span class="annottext">CondTree v c PDTagged
</span><a href="#local-6989586621679694895"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-263"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-264"></span><span>    </span><span id="local-6989586621679694893"><span class="annot"><span class="annottext">deleteConstraints :: CondTree v c a -&gt; CondTree v c a
</span><a href="#local-6989586621679694893"><span class="hs-identifier hs-var hs-var">deleteConstraints</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(c -&gt; c) -&gt; CondTree v c a -&gt; CondTree v c a
forall c d v a. (c -&gt; d) -&gt; CondTree v c a -&gt; CondTree v d a
</span><a href="Distribution.Types.CondTree.html#mapTreeConstrs"><span class="hs-identifier hs-var">mapTreeConstrs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">c -&gt; c -&gt; c
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">c
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-265"></span><span>
</span><span id="line-266"></span><span>    </span><span class="annot"><a href="#local-6989586621679694894"><span class="hs-identifier hs-type">getInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#PDTagged"><span class="hs-identifier hs-type">PDTagged</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.BuildInfo.html#BuildInfo"><span class="hs-identifier hs-type">BuildInfo</span></a></span><span>
</span><span id="line-267"></span><span>    </span><span id="local-6989586621679694894"><span class="annot"><span class="annottext">getInfo :: PDTagged -&gt; BuildInfo
</span><a href="#local-6989586621679694894"><span class="hs-identifier hs-var hs-var">getInfo</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#Lib"><span class="hs-identifier hs-type">Lib</span></a></span><span> </span><span id="local-6989586621679694887"><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679694887"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Library -&gt; BuildInfo
</span><a href="Distribution.Types.Library.html#libBuildInfo"><span class="hs-identifier hs-var hs-var">libBuildInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679694887"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-268"></span><span>    </span><span class="annot"><a href="#local-6989586621679694894"><span class="hs-identifier hs-var">getInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#SubComp"><span class="hs-identifier hs-type">SubComp</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679694884"><span class="annot"><span class="annottext">Component
</span><a href="#local-6989586621679694884"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Component -&gt; BuildInfo
</span><a href="Distribution.Types.Component.html#componentBuildInfo"><span class="hs-identifier hs-var">componentBuildInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Component
</span><a href="#local-6989586621679694884"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-269"></span><span>    </span><span class="annot"><a href="#local-6989586621679694894"><span class="hs-identifier hs-var">getInfo</span></a></span><span> </span><span class="annot"><span class="annottext">PDTagged
</span><a href="Distribution.PackageDescription.Configuration.html#PDNull"><span class="hs-identifier hs-var">PDNull</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span>
</span><span id="line-270"></span><span>
</span><span id="line-271"></span><span>
</span><span id="line-272"></span><span class="hs-comment">-- Note: extracting buildable conditions.</span><span>
</span><span id="line-273"></span><span class="hs-comment">-- --------------------------------------</span><span>
</span><span id="line-274"></span><span class="hs-comment">--</span><span>
</span><span id="line-275"></span><span class="hs-comment">-- If the conditions in a cond tree lead to Buildable being set to False, then</span><span>
</span><span id="line-276"></span><span class="hs-comment">-- none of the dependencies for this cond tree should actually be taken into</span><span>
</span><span id="line-277"></span><span class="hs-comment">-- account. On the other hand, some of the flags may only be decided in the</span><span>
</span><span id="line-278"></span><span class="hs-comment">-- solver, so we cannot necessarily make the decision whether a component is</span><span>
</span><span id="line-279"></span><span class="hs-comment">-- Buildable or not prior to solving.</span><span>
</span><span id="line-280"></span><span class="hs-comment">--</span><span>
</span><span id="line-281"></span><span class="hs-comment">-- What we are doing here is to partially evaluate a condition tree in order to</span><span>
</span><span id="line-282"></span><span class="hs-comment">-- extract the condition under which Buildable is True. The predicate determines</span><span>
</span><span id="line-283"></span><span class="hs-comment">-- whether data under a 'CondTree' is buildable.</span><span>
</span><span id="line-284"></span><span>
</span><span id="line-285"></span><span class="hs-comment">-- | Extract conditions matched by the given predicate from all cond trees in a</span><span>
</span><span id="line-286"></span><span class="hs-comment">-- 'GenericPackageDescription'.</span><span>
</span><span id="line-287"></span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#extractConditions"><span class="hs-identifier hs-type">extractConditions</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.BuildInfo.html#BuildInfo"><span class="hs-identifier hs-type">BuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.GenericPackageDescription.html#GenericPackageDescription"><span class="hs-identifier hs-type">GenericPackageDescription</span></a></span><span>
</span><span id="line-288"></span><span>                     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.Condition.html#Condition"><span class="hs-identifier hs-type">Condition</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.ConfVar.html#ConfVar"><span class="hs-identifier hs-type">ConfVar</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-289"></span><span id="extractConditions"><span class="annot"><span class="annottext">extractConditions :: (BuildInfo -&gt; Bool)
-&gt; GenericPackageDescription -&gt; [Condition ConfVar]
</span><a href="Distribution.PackageDescription.Configuration.html#extractConditions"><span class="hs-identifier hs-var hs-var">extractConditions</span></a></span></span><span> </span><span id="local-6989586621679694881"><span class="annot"><span class="annottext">BuildInfo -&gt; Bool
</span><a href="#local-6989586621679694881"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679694880"><span class="annot"><span class="annottext">GenericPackageDescription
</span><a href="#local-6989586621679694880"><span class="hs-identifier hs-var">gpkg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-290"></span><span>  </span><span class="annot"><span class="annottext">[[Condition ConfVar]] -&gt; [Condition ConfVar]
forall (t :: * -&gt; *) a. Foldable t =&gt; t [a] -&gt; [a]
</span><a href="../../base/src/Data.Foldable.html#concat"><span class="hs-identifier hs-var">concat</span></a></span><span> </span><span class="hs-special">[</span><span>
</span><span id="line-291"></span><span>      </span><span class="annot"><span class="annottext">(Library -&gt; Bool)
-&gt; CondTree ConfVar [Dependency] Library -&gt; Condition ConfVar
forall v a c. Eq v =&gt; (a -&gt; Bool) -&gt; CondTree v c a -&gt; Condition v
</span><a href="Distribution.Types.CondTree.html#extractCondition"><span class="hs-identifier hs-var">extractCondition</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; Bool
</span><a href="#local-6989586621679694881"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">(BuildInfo -&gt; Bool) -&gt; (Library -&gt; BuildInfo) -&gt; Library -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Library -&gt; BuildInfo
</span><a href="Distribution.Types.Library.html#libBuildInfo"><span class="hs-identifier hs-var hs-var">libBuildInfo</span></a></span><span class="hs-special">)</span><span>             </span><span class="annot"><span class="annottext">(CondTree ConfVar [Dependency] Library -&gt; Condition ConfVar)
-&gt; [CondTree ConfVar [Dependency] Library] -&gt; [Condition ConfVar]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (CondTree ConfVar [Dependency] Library)
-&gt; [CondTree ConfVar [Dependency] Library]
forall a. Maybe a -&gt; [a]
</span><a href="../../base/src/Data.Maybe.html#maybeToList"><span class="hs-identifier hs-var">maybeToList</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenericPackageDescription
-&gt; Maybe (CondTree ConfVar [Dependency] Library)
</span><a href="Distribution.Types.GenericPackageDescription.html#condLibrary"><span class="hs-identifier hs-var hs-var">condLibrary</span></a></span><span> </span><span class="annot"><span class="annottext">GenericPackageDescription
</span><a href="#local-6989586621679694880"><span class="hs-identifier hs-var">gpkg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-292"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(Library -&gt; Bool)
-&gt; CondTree ConfVar [Dependency] Library -&gt; Condition ConfVar
forall v a c. Eq v =&gt; (a -&gt; Bool) -&gt; CondTree v c a -&gt; Condition v
</span><a href="Distribution.Types.CondTree.html#extractCondition"><span class="hs-identifier hs-var">extractCondition</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; Bool
</span><a href="#local-6989586621679694881"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">(BuildInfo -&gt; Bool) -&gt; (Library -&gt; BuildInfo) -&gt; Library -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Library -&gt; BuildInfo
</span><a href="Distribution.Types.Library.html#libBuildInfo"><span class="hs-identifier hs-var hs-var">libBuildInfo</span></a></span><span class="hs-special">)</span><span>       </span><span class="annot"><span class="annottext">(CondTree ConfVar [Dependency] Library -&gt; Condition ConfVar)
-&gt; ((UnqualComponentName, CondTree ConfVar [Dependency] Library)
    -&gt; CondTree ConfVar [Dependency] Library)
-&gt; (UnqualComponentName, CondTree ConfVar [Dependency] Library)
-&gt; Condition ConfVar
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(UnqualComponentName, CondTree ConfVar [Dependency] Library)
-&gt; CondTree ConfVar [Dependency] Library
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span> </span><span class="annot"><span class="annottext">((UnqualComponentName, CondTree ConfVar [Dependency] Library)
 -&gt; Condition ConfVar)
-&gt; [(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
-&gt; [Condition ConfVar]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">GenericPackageDescription
-&gt; [(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
</span><a href="Distribution.Types.GenericPackageDescription.html#condSubLibraries"><span class="hs-identifier hs-var hs-var">condSubLibraries</span></a></span><span>   </span><span class="annot"><span class="annottext">GenericPackageDescription
</span><a href="#local-6989586621679694880"><span class="hs-identifier hs-var">gpkg</span></a></span><span>
</span><span id="line-293"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(Executable -&gt; Bool)
-&gt; CondTree ConfVar [Dependency] Executable -&gt; Condition ConfVar
forall v a c. Eq v =&gt; (a -&gt; Bool) -&gt; CondTree v c a -&gt; Condition v
</span><a href="Distribution.Types.CondTree.html#extractCondition"><span class="hs-identifier hs-var">extractCondition</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; Bool
</span><a href="#local-6989586621679694881"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">(BuildInfo -&gt; Bool)
-&gt; (Executable -&gt; BuildInfo) -&gt; Executable -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Executable -&gt; BuildInfo
</span><a href="Distribution.Types.Executable.html#buildInfo"><span class="hs-identifier hs-var hs-var">buildInfo</span></a></span><span class="hs-special">)</span><span>          </span><span class="annot"><span class="annottext">(CondTree ConfVar [Dependency] Executable -&gt; Condition ConfVar)
-&gt; ((UnqualComponentName, CondTree ConfVar [Dependency] Executable)
    -&gt; CondTree ConfVar [Dependency] Executable)
-&gt; (UnqualComponentName, CondTree ConfVar [Dependency] Executable)
-&gt; Condition ConfVar
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(UnqualComponentName, CondTree ConfVar [Dependency] Executable)
-&gt; CondTree ConfVar [Dependency] Executable
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span> </span><span class="annot"><span class="annottext">((UnqualComponentName, CondTree ConfVar [Dependency] Executable)
 -&gt; Condition ConfVar)
-&gt; [(UnqualComponentName,
     CondTree ConfVar [Dependency] Executable)]
-&gt; [Condition ConfVar]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">GenericPackageDescription
-&gt; [(UnqualComponentName,
     CondTree ConfVar [Dependency] Executable)]
</span><a href="Distribution.Types.GenericPackageDescription.html#condExecutables"><span class="hs-identifier hs-var hs-var">condExecutables</span></a></span><span> </span><span class="annot"><span class="annottext">GenericPackageDescription
</span><a href="#local-6989586621679694880"><span class="hs-identifier hs-var">gpkg</span></a></span><span>
</span><span id="line-294"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(TestSuite -&gt; Bool)
-&gt; CondTree ConfVar [Dependency] TestSuite -&gt; Condition ConfVar
forall v a c. Eq v =&gt; (a -&gt; Bool) -&gt; CondTree v c a -&gt; Condition v
</span><a href="Distribution.Types.CondTree.html#extractCondition"><span class="hs-identifier hs-var">extractCondition</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; Bool
</span><a href="#local-6989586621679694881"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">(BuildInfo -&gt; Bool)
-&gt; (TestSuite -&gt; BuildInfo) -&gt; TestSuite -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite -&gt; BuildInfo
</span><a href="Distribution.Types.TestSuite.html#testBuildInfo"><span class="hs-identifier hs-var hs-var">testBuildInfo</span></a></span><span class="hs-special">)</span><span>      </span><span class="annot"><span class="annottext">(CondTree ConfVar [Dependency] TestSuite -&gt; Condition ConfVar)
-&gt; ((UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)
    -&gt; CondTree ConfVar [Dependency] TestSuite)
-&gt; (UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)
-&gt; Condition ConfVar
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)
-&gt; CondTree ConfVar [Dependency] TestSuite
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span> </span><span class="annot"><span class="annottext">((UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)
 -&gt; Condition ConfVar)
-&gt; [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
-&gt; [Condition ConfVar]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">GenericPackageDescription
-&gt; [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
</span><a href="Distribution.Types.GenericPackageDescription.html#condTestSuites"><span class="hs-identifier hs-var hs-var">condTestSuites</span></a></span><span>  </span><span class="annot"><span class="annottext">GenericPackageDescription
</span><a href="#local-6989586621679694880"><span class="hs-identifier hs-var">gpkg</span></a></span><span>
</span><span id="line-295"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(Benchmark -&gt; Bool)
-&gt; CondTree ConfVar [Dependency] Benchmark -&gt; Condition ConfVar
forall v a c. Eq v =&gt; (a -&gt; Bool) -&gt; CondTree v c a -&gt; Condition v
</span><a href="Distribution.Types.CondTree.html#extractCondition"><span class="hs-identifier hs-var">extractCondition</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; Bool
</span><a href="#local-6989586621679694881"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">(BuildInfo -&gt; Bool)
-&gt; (Benchmark -&gt; BuildInfo) -&gt; Benchmark -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Benchmark -&gt; BuildInfo
</span><a href="Distribution.Types.Benchmark.html#benchmarkBuildInfo"><span class="hs-identifier hs-var hs-var">benchmarkBuildInfo</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(CondTree ConfVar [Dependency] Benchmark -&gt; Condition ConfVar)
-&gt; ((UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)
    -&gt; CondTree ConfVar [Dependency] Benchmark)
-&gt; (UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)
-&gt; Condition ConfVar
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)
-&gt; CondTree ConfVar [Dependency] Benchmark
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span> </span><span class="annot"><span class="annottext">((UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)
 -&gt; Condition ConfVar)
-&gt; [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
-&gt; [Condition ConfVar]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">GenericPackageDescription
-&gt; [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
</span><a href="Distribution.Types.GenericPackageDescription.html#condBenchmarks"><span class="hs-identifier hs-var hs-var">condBenchmarks</span></a></span><span>  </span><span class="annot"><span class="annottext">GenericPackageDescription
</span><a href="#local-6989586621679694880"><span class="hs-identifier hs-var">gpkg</span></a></span><span>
</span><span id="line-296"></span><span>    </span><span class="hs-special">]</span><span>
</span><span id="line-297"></span><span>
</span><span id="line-298"></span><span>
</span><span id="line-299"></span><span class="hs-comment">-- | A map of package constraints that combines version ranges using 'unionVersionRanges'.</span><span>
</span><span id="line-300"></span><span class="hs-keyword">newtype</span><span> </span><span id="DepMapUnion"><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#DepMapUnion"><span class="hs-identifier hs-var">DepMapUnion</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="DepMapUnion"><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#DepMapUnion"><span class="hs-identifier hs-var">DepMapUnion</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="unDepMapUnion"><span class="annot"><span class="annottext">DepMapUnion
-&gt; Map PackageName (VersionRange, NonEmptySet LibraryName)
</span><a href="Distribution.PackageDescription.Configuration.html#unDepMapUnion"><span class="hs-identifier hs-var hs-var">unDepMapUnion</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.PackageName.html#PackageName"><span class="hs-identifier hs-type">PackageName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionRange.Internal.html#VersionRange"><span class="hs-identifier hs-type">VersionRange</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Compat.NonEmptySet.html#NonEmptySet"><span class="hs-identifier hs-type">NonEmptySet</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.LibraryName.html#LibraryName"><span class="hs-identifier hs-type">LibraryName</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-301"></span><span>
</span><span id="line-302"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679694863"><span id="local-6989586621679694865"><span class="annot"><a href="../../base/src/GHC.Base.html#Semigroup"><span class="hs-identifier hs-type">Semigroup</span></a></span><span> </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#DepMapUnion"><span class="hs-identifier hs-type">DepMapUnion</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-303"></span><span>    </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#DepMapUnion"><span class="hs-identifier hs-type">DepMapUnion</span></a></span><span> </span><span id="local-6989586621679694861"><span class="annot"><span class="annottext">Map PackageName (VersionRange, NonEmptySet LibraryName)
</span><a href="#local-6989586621679694861"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679694860"><span class="annot"><span class="annottext">&lt;&gt; :: DepMapUnion -&gt; DepMapUnion -&gt; DepMapUnion
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;&gt;</span></a></span></span><span> </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#DepMapUnion"><span class="hs-identifier hs-type">DepMapUnion</span></a></span><span> </span><span id="local-6989586621679694859"><span class="annot"><span class="annottext">Map PackageName (VersionRange, NonEmptySet LibraryName)
</span><a href="#local-6989586621679694859"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Map PackageName (VersionRange, NonEmptySet LibraryName)
-&gt; DepMapUnion
</span><a href="Distribution.PackageDescription.Configuration.html#DepMapUnion"><span class="hs-identifier hs-var">DepMapUnion</span></a></span><span> </span><span class="annot"><span class="annottext">(Map PackageName (VersionRange, NonEmptySet LibraryName)
 -&gt; DepMapUnion)
-&gt; Map PackageName (VersionRange, NonEmptySet LibraryName)
-&gt; DepMapUnion
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-304"></span><span>        </span><span class="annot"><span class="annottext">((VersionRange, NonEmptySet LibraryName)
 -&gt; (VersionRange, NonEmptySet LibraryName)
 -&gt; (VersionRange, NonEmptySet LibraryName))
-&gt; Map PackageName (VersionRange, NonEmptySet LibraryName)
-&gt; Map PackageName (VersionRange, NonEmptySet LibraryName)
-&gt; Map PackageName (VersionRange, NonEmptySet LibraryName)
forall k a. Ord k =&gt; (a -&gt; a -&gt; a) -&gt; Map k a -&gt; Map k a -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#unionWith"><span class="hs-identifier hs-var">Map.unionWith</span></a></span><span> </span><span class="annot"><span class="annottext">(VersionRange, NonEmptySet LibraryName)
-&gt; (VersionRange, NonEmptySet LibraryName)
-&gt; (VersionRange, NonEmptySet LibraryName)
</span><a href="Distribution.PackageDescription.Configuration.html#unionVersionRanges%27"><span class="hs-identifier hs-var">unionVersionRanges'</span></a></span><span> </span><span class="annot"><span class="annottext">Map PackageName (VersionRange, NonEmptySet LibraryName)
</span><a href="#local-6989586621679694861"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Map PackageName (VersionRange, NonEmptySet LibraryName)
</span><a href="#local-6989586621679694859"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-305"></span><span>
</span><span id="line-306"></span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#unionVersionRanges%27"><span class="hs-identifier hs-type">unionVersionRanges'</span></a></span><span>
</span><span id="line-307"></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionRange.Internal.html#VersionRange"><span class="hs-identifier hs-type">VersionRange</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Compat.NonEmptySet.html#NonEmptySet"><span class="hs-identifier hs-type">NonEmptySet</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.LibraryName.html#LibraryName"><span class="hs-identifier hs-type">LibraryName</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-308"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionRange.Internal.html#VersionRange"><span class="hs-identifier hs-type">VersionRange</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Compat.NonEmptySet.html#NonEmptySet"><span class="hs-identifier hs-type">NonEmptySet</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.LibraryName.html#LibraryName"><span class="hs-identifier hs-type">LibraryName</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-309"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionRange.Internal.html#VersionRange"><span class="hs-identifier hs-type">VersionRange</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Compat.NonEmptySet.html#NonEmptySet"><span class="hs-identifier hs-type">NonEmptySet</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.LibraryName.html#LibraryName"><span class="hs-identifier hs-type">LibraryName</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-310"></span><span id="unionVersionRanges%27"><span class="annot"><span class="annottext">unionVersionRanges' :: (VersionRange, NonEmptySet LibraryName)
-&gt; (VersionRange, NonEmptySet LibraryName)
-&gt; (VersionRange, NonEmptySet LibraryName)
</span><a href="Distribution.PackageDescription.Configuration.html#unionVersionRanges%27"><span class="hs-identifier hs-var hs-var">unionVersionRanges'</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679694856"><span class="annot"><span class="annottext">VersionRange
</span><a href="#local-6989586621679694856"><span class="hs-identifier hs-var">vr</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679694855"><span class="annot"><span class="annottext">NonEmptySet LibraryName
</span><a href="#local-6989586621679694855"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679694854"><span class="annot"><span class="annottext">VersionRange
</span><a href="#local-6989586621679694854"><span class="hs-identifier hs-var">vr'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679694853"><span class="annot"><span class="annottext">NonEmptySet LibraryName
</span><a href="#local-6989586621679694853"><span class="hs-identifier hs-var">cs'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">VersionRange -&gt; VersionRange -&gt; VersionRange
</span><a href="Distribution.Types.VersionRange.Internal.html#unionVersionRanges"><span class="hs-identifier hs-var">unionVersionRanges</span></a></span><span> </span><span class="annot"><span class="annottext">VersionRange
</span><a href="#local-6989586621679694856"><span class="hs-identifier hs-var">vr</span></a></span><span> </span><span class="annot"><span class="annottext">VersionRange
</span><a href="#local-6989586621679694854"><span class="hs-identifier hs-var">vr'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">NonEmptySet LibraryName
</span><a href="#local-6989586621679694855"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="annot"><span class="annottext">NonEmptySet LibraryName
-&gt; NonEmptySet LibraryName -&gt; NonEmptySet LibraryName
forall a. Semigroup a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">NonEmptySet LibraryName
</span><a href="#local-6989586621679694853"><span class="hs-identifier hs-var">cs'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-311"></span><span>
</span><span id="line-312"></span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#toDepMapUnion"><span class="hs-identifier hs-type">toDepMapUnion</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.Dependency.html#Dependency"><span class="hs-identifier hs-type">Dependency</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#DepMapUnion"><span class="hs-identifier hs-type">DepMapUnion</span></a></span><span>
</span><span id="line-313"></span><span id="toDepMapUnion"><span class="annot"><span class="annottext">toDepMapUnion :: [Dependency] -&gt; DepMapUnion
</span><a href="Distribution.PackageDescription.Configuration.html#toDepMapUnion"><span class="hs-identifier hs-var hs-var">toDepMapUnion</span></a></span></span><span> </span><span id="local-6989586621679694851"><span class="annot"><span class="annottext">[Dependency]
</span><a href="#local-6989586621679694851"><span class="hs-identifier hs-var">ds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-314"></span><span>  </span><span class="annot"><span class="annottext">Map PackageName (VersionRange, NonEmptySet LibraryName)
-&gt; DepMapUnion
</span><a href="Distribution.PackageDescription.Configuration.html#DepMapUnion"><span class="hs-identifier hs-var">DepMapUnion</span></a></span><span> </span><span class="annot"><span class="annottext">(Map PackageName (VersionRange, NonEmptySet LibraryName)
 -&gt; DepMapUnion)
-&gt; Map PackageName (VersionRange, NonEmptySet LibraryName)
-&gt; DepMapUnion
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">((VersionRange, NonEmptySet LibraryName)
 -&gt; (VersionRange, NonEmptySet LibraryName)
 -&gt; (VersionRange, NonEmptySet LibraryName))
-&gt; [(PackageName, (VersionRange, NonEmptySet LibraryName))]
-&gt; Map PackageName (VersionRange, NonEmptySet LibraryName)
forall k a. Ord k =&gt; (a -&gt; a -&gt; a) -&gt; [(k, a)] -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#fromListWith"><span class="hs-identifier hs-var">Map.fromListWith</span></a></span><span> </span><span class="annot"><span class="annottext">(VersionRange, NonEmptySet LibraryName)
-&gt; (VersionRange, NonEmptySet LibraryName)
-&gt; (VersionRange, NonEmptySet LibraryName)
</span><a href="Distribution.PackageDescription.Configuration.html#unionVersionRanges%27"><span class="hs-identifier hs-var">unionVersionRanges'</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageName
</span><a href="#local-6989586621679694849"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">,</span><span class="hs-special">(</span><span class="annot"><span class="annottext">VersionRange
</span><a href="#local-6989586621679694848"><span class="hs-identifier hs-var">vr</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">NonEmptySet LibraryName
</span><a href="#local-6989586621679694847"><span class="hs-identifier hs-var">cs</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="Distribution.Types.Dependency.html#Dependency"><span class="hs-identifier hs-type">Dependency</span></a></span><span> </span><span id="local-6989586621679694849"><span class="annot"><span class="annottext">PackageName
</span><a href="#local-6989586621679694849"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679694848"><span class="annot"><span class="annottext">VersionRange
</span><a href="#local-6989586621679694848"><span class="hs-identifier hs-var">vr</span></a></span></span><span> </span><span id="local-6989586621679694847"><span class="annot"><span class="annottext">NonEmptySet LibraryName
</span><a href="#local-6989586621679694847"><span class="hs-identifier hs-var">cs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Dependency]
</span><a href="#local-6989586621679694851"><span class="hs-identifier hs-var">ds</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-315"></span><span>
</span><span id="line-316"></span><span>
</span><span id="line-317"></span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#fromDepMapUnion"><span class="hs-identifier hs-type">fromDepMapUnion</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#DepMapUnion"><span class="hs-identifier hs-type">DepMapUnion</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.Dependency.html#Dependency"><span class="hs-identifier hs-type">Dependency</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-318"></span><span id="fromDepMapUnion"><span class="annot"><span class="annottext">fromDepMapUnion :: DepMapUnion -&gt; [Dependency]
</span><a href="Distribution.PackageDescription.Configuration.html#fromDepMapUnion"><span class="hs-identifier hs-var hs-var">fromDepMapUnion</span></a></span></span><span> </span><span id="local-6989586621679694845"><span class="annot"><span class="annottext">DepMapUnion
</span><a href="#local-6989586621679694845"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">PackageName
-&gt; VersionRange -&gt; NonEmptySet LibraryName -&gt; Dependency
</span><a href="Distribution.Types.Dependency.html#Dependency"><span class="hs-identifier hs-var">Dependency</span></a></span><span> </span><span class="annot"><span class="annottext">PackageName
</span><a href="#local-6989586621679694844"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">VersionRange
</span><a href="#local-6989586621679694843"><span class="hs-identifier hs-var">vr</span></a></span><span> </span><span class="annot"><span class="annottext">NonEmptySet LibraryName
</span><a href="#local-6989586621679694842"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679694844"><span class="annot"><span class="annottext">PackageName
</span><a href="#local-6989586621679694844"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">,</span><span class="hs-special">(</span><span id="local-6989586621679694843"><span class="annot"><span class="annottext">VersionRange
</span><a href="#local-6989586621679694843"><span class="hs-identifier hs-var">vr</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679694842"><span class="annot"><span class="annottext">NonEmptySet LibraryName
</span><a href="#local-6989586621679694842"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Map PackageName (VersionRange, NonEmptySet LibraryName)
-&gt; [(PackageName, (VersionRange, NonEmptySet LibraryName))]
forall k a. Map k a -&gt; [(k, a)]
</span><a href="../../containers/src/Data.Map.Internal.html#toList"><span class="hs-identifier hs-var">Map.toList</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DepMapUnion
-&gt; Map PackageName (VersionRange, NonEmptySet LibraryName)
</span><a href="Distribution.PackageDescription.Configuration.html#unDepMapUnion"><span class="hs-identifier hs-var hs-var">unDepMapUnion</span></a></span><span> </span><span class="annot"><span class="annottext">DepMapUnion
</span><a href="#local-6989586621679694845"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-319"></span><span>
</span><span id="line-320"></span><span id="local-6989586621679695351"><span id="local-6989586621679695352"><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#freeVars"><span class="hs-identifier hs-type">freeVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.CondTree.html#CondTree"><span class="hs-identifier hs-type">CondTree</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.ConfVar.html#ConfVar"><span class="hs-identifier hs-type">ConfVar</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679695352"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679695351"><span class="hs-identifier hs-type">a</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.Flag.html#FlagName"><span class="hs-identifier hs-type">FlagName</span></a></span><span class="hs-special">]</span></span></span><span>
</span><span id="line-321"></span><span id="freeVars"><span class="annot"><span class="annottext">freeVars :: forall c a. CondTree ConfVar c a -&gt; [FlagName]
</span><a href="Distribution.PackageDescription.Configuration.html#freeVars"><span class="hs-identifier hs-var hs-var">freeVars</span></a></span></span><span> </span><span id="local-6989586621679694840"><span class="annot"><span class="annottext">CondTree ConfVar c a
</span><a href="#local-6989586621679694840"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">FlagName
</span><a href="#local-6989586621679694839"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="Distribution.Types.ConfVar.html#PackageFlag"><span class="hs-identifier hs-type">PackageFlag</span></a></span><span> </span><span id="local-6989586621679694839"><span class="annot"><span class="annottext">FlagName
</span><a href="#local-6989586621679694839"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CondTree ConfVar c a -&gt; [ConfVar]
forall {a} {c} {a}. CondTree a c a -&gt; [a]
</span><a href="#local-6989586621679694838"><span class="hs-identifier hs-var">freeVars'</span></a></span><span> </span><span class="annot"><span class="annottext">CondTree ConfVar c a
</span><a href="#local-6989586621679694840"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-322"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-323"></span><span>    </span><span id="local-6989586621679694838"><span class="annot"><span class="annottext">freeVars' :: CondTree a c a -&gt; [a]
</span><a href="#local-6989586621679694838"><span class="hs-identifier hs-var hs-var">freeVars'</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.CondTree.html#CondNode"><span class="hs-identifier hs-type">CondNode</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">c
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679694836"><span class="annot"><span class="annottext">[CondBranch a c a]
</span><a href="#local-6989586621679694836"><span class="hs-identifier hs-var">ifs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CondBranch a c a -&gt; [a]) -&gt; [CondBranch a c a] -&gt; [a]
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="annot"><span class="annottext">CondBranch a c a -&gt; [a]
</span><a href="#local-6989586621679694834"><span class="hs-identifier hs-var">compfv</span></a></span><span> </span><span class="annot"><span class="annottext">[CondBranch a c a]
</span><a href="#local-6989586621679694836"><span class="hs-identifier hs-var">ifs</span></a></span><span>
</span><span id="line-324"></span><span>    </span><span id="local-6989586621679694834"><span class="annot"><span class="annottext">compfv :: CondBranch a c a -&gt; [a]
</span><a href="#local-6989586621679694834"><span class="hs-identifier hs-var hs-var">compfv</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.CondTree.html#CondBranch"><span class="hs-identifier hs-type">CondBranch</span></a></span><span> </span><span id="local-6989586621679694832"><span class="annot"><span class="annottext">Condition a
</span><a href="#local-6989586621679694832"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679694831"><span class="annot"><span class="annottext">CondTree a c a
</span><a href="#local-6989586621679694831"><span class="hs-identifier hs-var">ct</span></a></span></span><span> </span><span id="local-6989586621679694830"><span class="annot"><span class="annottext">Maybe (CondTree a c a)
</span><a href="#local-6989586621679694830"><span class="hs-identifier hs-var">mct</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Condition a -&gt; [a]
forall {a}. Condition a -&gt; [a]
</span><a href="#local-6989586621679694829"><span class="hs-identifier hs-var">condfv</span></a></span><span> </span><span class="annot"><span class="annottext">Condition a
</span><a href="#local-6989586621679694832"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; [a]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">CondTree a c a -&gt; [a]
</span><a href="#local-6989586621679694838"><span class="hs-identifier hs-var">freeVars'</span></a></span><span> </span><span class="annot"><span class="annottext">CondTree a c a
</span><a href="#local-6989586621679694831"><span class="hs-identifier hs-var">ct</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; [a]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; (CondTree a c a -&gt; [a]) -&gt; Maybe (CondTree a c a) -&gt; [a]
forall b a. b -&gt; (a -&gt; b) -&gt; Maybe a -&gt; b
</span><a href="../../base/src/Data.Maybe.html#maybe"><span class="hs-identifier hs-var">maybe</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">CondTree a c a -&gt; [a]
</span><a href="#local-6989586621679694838"><span class="hs-identifier hs-var">freeVars'</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (CondTree a c a)
</span><a href="#local-6989586621679694830"><span class="hs-identifier hs-var">mct</span></a></span><span>
</span><span id="line-325"></span><span>    </span><span id="local-6989586621679694829"><span class="annot"><span class="annottext">condfv :: Condition a -&gt; [a]
</span><a href="#local-6989586621679694829"><span class="hs-identifier hs-var hs-var">condfv</span></a></span></span><span> </span><span id="local-6989586621679694828"><span class="annot"><span class="annottext">Condition a
</span><a href="#local-6989586621679694828"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Condition a
</span><a href="#local-6989586621679694828"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-326"></span><span>      </span><span class="annot"><a href="Distribution.Types.Condition.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span id="local-6989586621679694827"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679694827"><span class="hs-identifier hs-var">v</span></a></span></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679694827"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-327"></span><span>      </span><span class="annot"><a href="Distribution.Types.Condition.html#Lit"><span class="hs-identifier hs-type">Lit</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-328"></span><span>      </span><span class="annot"><a href="Distribution.Types.Condition.html#CNot"><span class="hs-identifier hs-type">CNot</span></a></span><span> </span><span id="local-6989586621679694826"><span class="annot"><span class="annottext">Condition a
</span><a href="#local-6989586621679694826"><span class="hs-identifier hs-var">c'</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Condition a -&gt; [a]
</span><a href="#local-6989586621679694829"><span class="hs-identifier hs-var">condfv</span></a></span><span> </span><span class="annot"><span class="annottext">Condition a
</span><a href="#local-6989586621679694826"><span class="hs-identifier hs-var">c'</span></a></span><span>
</span><span id="line-329"></span><span>      </span><span class="annot"><a href="Distribution.Types.Condition.html#COr"><span class="hs-identifier hs-type">COr</span></a></span><span> </span><span id="local-6989586621679694825"><span class="annot"><span class="annottext">Condition a
</span><a href="#local-6989586621679694825"><span class="hs-identifier hs-var">c1</span></a></span></span><span> </span><span id="local-6989586621679694824"><span class="annot"><span class="annottext">Condition a
</span><a href="#local-6989586621679694824"><span class="hs-identifier hs-var">c2</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Condition a -&gt; [a]
</span><a href="#local-6989586621679694829"><span class="hs-identifier hs-var">condfv</span></a></span><span> </span><span class="annot"><span class="annottext">Condition a
</span><a href="#local-6989586621679694825"><span class="hs-identifier hs-var">c1</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; [a]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Condition a -&gt; [a]
</span><a href="#local-6989586621679694829"><span class="hs-identifier hs-var">condfv</span></a></span><span> </span><span class="annot"><span class="annottext">Condition a
</span><a href="#local-6989586621679694824"><span class="hs-identifier hs-var">c2</span></a></span><span>
</span><span id="line-330"></span><span>      </span><span class="annot"><a href="Distribution.Types.Condition.html#CAnd"><span class="hs-identifier hs-type">CAnd</span></a></span><span> </span><span id="local-6989586621679694823"><span class="annot"><span class="annottext">Condition a
</span><a href="#local-6989586621679694823"><span class="hs-identifier hs-var">c1</span></a></span></span><span> </span><span id="local-6989586621679694822"><span class="annot"><span class="annottext">Condition a
</span><a href="#local-6989586621679694822"><span class="hs-identifier hs-var">c2</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Condition a -&gt; [a]
</span><a href="#local-6989586621679694829"><span class="hs-identifier hs-var">condfv</span></a></span><span> </span><span class="annot"><span class="annottext">Condition a
</span><a href="#local-6989586621679694823"><span class="hs-identifier hs-var">c1</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; [a]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Condition a -&gt; [a]
</span><a href="#local-6989586621679694829"><span class="hs-identifier hs-var">condfv</span></a></span><span> </span><span class="annot"><span class="annottext">Condition a
</span><a href="#local-6989586621679694822"><span class="hs-identifier hs-var">c2</span></a></span><span>
</span><span id="line-331"></span><span>
</span><span id="line-332"></span><span>
</span><span id="line-333"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-334"></span><span>
</span><span id="line-335"></span><span class="hs-comment">-- | A set of targets with their package dependencies</span><span>
</span><span id="line-336"></span><span class="hs-keyword">newtype</span><span> </span><span id="TargetSet"><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#TargetSet"><span class="hs-identifier hs-var">TargetSet</span></a></span></span><span> </span><span id="local-6989586621679695426"><span class="annot"><a href="#local-6989586621679695426"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="TargetSet"><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#TargetSet"><span class="hs-identifier hs-var">TargetSet</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.DependencyMap.html#DependencyMap"><span class="hs-identifier hs-type">DependencyMap</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621679695426"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-337"></span><span>
</span><span id="line-338"></span><span class="hs-comment">-- | Combine the target-specific dependencies in a TargetSet to give the</span><span>
</span><span id="line-339"></span><span class="hs-comment">-- dependencies for the package as a whole.</span><span>
</span><span id="line-340"></span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#overallDependencies"><span class="hs-identifier hs-type">overallDependencies</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentRequestedSpec.html#ComponentRequestedSpec"><span class="hs-identifier hs-type">ComponentRequestedSpec</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#TargetSet"><span class="hs-identifier hs-type">TargetSet</span></a></span><span> </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#PDTagged"><span class="hs-identifier hs-type">PDTagged</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.DependencyMap.html#DependencyMap"><span class="hs-identifier hs-type">DependencyMap</span></a></span><span>
</span><span id="line-341"></span><span id="overallDependencies"><span class="annot"><span class="annottext">overallDependencies :: ComponentRequestedSpec -&gt; TargetSet PDTagged -&gt; DependencyMap
</span><a href="Distribution.PackageDescription.Configuration.html#overallDependencies"><span class="hs-identifier hs-var hs-var">overallDependencies</span></a></span></span><span> </span><span id="local-6989586621679694821"><span class="annot"><span class="annottext">ComponentRequestedSpec
</span><a href="#local-6989586621679694821"><span class="hs-identifier hs-var">enabled</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#TargetSet"><span class="hs-identifier hs-type">TargetSet</span></a></span><span> </span><span id="local-6989586621679694820"><span class="annot"><span class="annottext">[(DependencyMap, PDTagged)]
</span><a href="#local-6989586621679694820"><span class="hs-identifier hs-var">targets</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[DependencyMap] -&gt; DependencyMap
forall a. Monoid a =&gt; [a] -&gt; a
</span><a href="../../base/src/GHC.Base.html#mconcat"><span class="hs-identifier hs-var">mconcat</span></a></span><span> </span><span class="annot"><span class="annottext">[DependencyMap]
</span><a href="#local-6989586621679694819"><span class="hs-identifier hs-var">depss</span></a></span><span>
</span><span id="line-342"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-343"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679694819"><span class="annot"><span class="annottext">[DependencyMap]
</span><a href="#local-6989586621679694819"><span class="hs-identifier hs-var">depss</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[PDTagged]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(DependencyMap, PDTagged)] -&gt; ([DependencyMap], [PDTagged])
forall a b. [(a, b)] -&gt; ([a], [b])
</span><a href="../../base/src/GHC.List.html#unzip"><span class="hs-identifier hs-var">unzip</span></a></span><span> </span><span class="annot"><span class="annottext">([(DependencyMap, PDTagged)] -&gt; ([DependencyMap], [PDTagged]))
-&gt; [(DependencyMap, PDTagged)] -&gt; ([DependencyMap], [PDTagged])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">((DependencyMap, PDTagged) -&gt; Bool)
-&gt; [(DependencyMap, PDTagged)] -&gt; [(DependencyMap, PDTagged)]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PDTagged -&gt; Bool
</span><a href="#local-6989586621679694817"><span class="hs-identifier hs-var">removeDisabledSections</span></a></span><span> </span><span class="annot"><span class="annottext">(PDTagged -&gt; Bool)
-&gt; ((DependencyMap, PDTagged) -&gt; PDTagged)
-&gt; (DependencyMap, PDTagged)
-&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(DependencyMap, PDTagged) -&gt; PDTagged
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[(DependencyMap, PDTagged)]
</span><a href="#local-6989586621679694820"><span class="hs-identifier hs-var">targets</span></a></span><span>
</span><span id="line-344"></span><span>    </span><span class="annot"><a href="#local-6989586621679694817"><span class="hs-identifier hs-type">removeDisabledSections</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#PDTagged"><span class="hs-identifier hs-type">PDTagged</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-345"></span><span>    </span><span class="hs-comment">-- UGH. The embedded componentName in the 'Component's here is</span><span>
</span><span id="line-346"></span><span>    </span><span class="hs-comment">-- BLANK.  I don't know whose fault this is but I'll use the tag</span><span>
</span><span id="line-347"></span><span>    </span><span class="hs-comment">-- instead. -- ezyang</span><span>
</span><span id="line-348"></span><span>    </span><span id="local-6989586621679694817"><span class="annot"><span class="annottext">removeDisabledSections :: PDTagged -&gt; Bool
</span><a href="#local-6989586621679694817"><span class="hs-identifier hs-var hs-var">removeDisabledSections</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#Lib"><span class="hs-identifier hs-type">Lib</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentRequestedSpec -&gt; ComponentName -&gt; Bool
</span><a href="Distribution.Types.ComponentRequestedSpec.html#componentNameRequested"><span class="hs-identifier hs-var">componentNameRequested</span></a></span><span>
</span><span id="line-349"></span><span>                                           </span><span class="annot"><span class="annottext">ComponentRequestedSpec
</span><a href="#local-6989586621679694821"><span class="hs-identifier hs-var">enabled</span></a></span><span>
</span><span id="line-350"></span><span>                                           </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LibraryName -&gt; ComponentName
</span><a href="Distribution.Types.ComponentName.html#CLibName"><span class="hs-identifier hs-var">CLibName</span></a></span><span> </span><span class="annot"><span class="annottext">LibraryName
</span><a href="Distribution.Types.LibraryName.html#LMainLibName"><span class="hs-identifier hs-var">LMainLibName</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-351"></span><span>    </span><span class="annot"><a href="#local-6989586621679694817"><span class="hs-identifier hs-var">removeDisabledSections</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#SubComp"><span class="hs-identifier hs-type">SubComp</span></a></span><span> </span><span id="local-6989586621679694813"><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694813"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span id="local-6989586621679694812"><span class="annot"><span class="annottext">Component
</span><a href="#local-6989586621679694812"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-352"></span><span>        </span><span class="hs-comment">-- Do NOT use componentName</span><span>
</span><span id="line-353"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentRequestedSpec -&gt; ComponentName -&gt; Bool
</span><a href="Distribution.Types.ComponentRequestedSpec.html#componentNameRequested"><span class="hs-identifier hs-var">componentNameRequested</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentRequestedSpec
</span><a href="#local-6989586621679694821"><span class="hs-identifier hs-var">enabled</span></a></span><span>
</span><span id="line-354"></span><span>        </span><span class="annot"><span class="annottext">(ComponentName -&gt; Bool) -&gt; ComponentName -&gt; Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Component
</span><a href="#local-6989586621679694812"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-355"></span><span>            </span><span class="annot"><a href="Distribution.Types.Component.html#CLib"><span class="hs-identifier hs-type">CLib</span></a></span><span>  </span><span class="annot"><span class="annottext">Library
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LibraryName -&gt; ComponentName
</span><a href="Distribution.Types.ComponentName.html#CLibName"><span class="hs-identifier hs-var">CLibName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UnqualComponentName -&gt; LibraryName
</span><a href="Distribution.Types.LibraryName.html#LSubLibName"><span class="hs-identifier hs-var">LSubLibName</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694813"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-356"></span><span>            </span><span class="annot"><a href="Distribution.Types.Component.html#CFLib"><span class="hs-identifier hs-type">CFLib</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; ComponentName
</span><a href="Distribution.Types.ComponentName.html#CFLibName"><span class="hs-identifier hs-var">CFLibName</span></a></span><span>   </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694813"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-357"></span><span>            </span><span class="annot"><a href="Distribution.Types.Component.html#CExe"><span class="hs-identifier hs-type">CExe</span></a></span><span>  </span><span class="annot"><span class="annottext">Executable
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; ComponentName
</span><a href="Distribution.Types.ComponentName.html#CExeName"><span class="hs-identifier hs-var">CExeName</span></a></span><span>    </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694813"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-358"></span><span>            </span><span class="annot"><a href="Distribution.Types.Component.html#CTest"><span class="hs-identifier hs-type">CTest</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; ComponentName
</span><a href="Distribution.Types.ComponentName.html#CTestName"><span class="hs-identifier hs-var">CTestName</span></a></span><span>   </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694813"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-359"></span><span>            </span><span class="annot"><a href="Distribution.Types.Component.html#CBench"><span class="hs-identifier hs-type">CBench</span></a></span><span> </span><span class="annot"><span class="annottext">Benchmark
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; ComponentName
</span><a href="Distribution.Types.ComponentName.html#CBenchName"><span class="hs-identifier hs-var">CBenchName</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694813"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-360"></span><span>    </span><span class="annot"><a href="#local-6989586621679694817"><span class="hs-identifier hs-var">removeDisabledSections</span></a></span><span> </span><span class="annot"><span class="annottext">PDTagged
</span><a href="Distribution.PackageDescription.Configuration.html#PDNull"><span class="hs-identifier hs-var">PDNull</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-361"></span><span>
</span><span id="line-362"></span><span class="hs-comment">-- | Collect up the targets in a TargetSet of tagged targets, storing the</span><span>
</span><span id="line-363"></span><span class="hs-comment">-- dependencies as we go.</span><span>
</span><span id="line-364"></span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#flattenTaggedTargets"><span class="hs-identifier hs-type">flattenTaggedTargets</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#TargetSet"><span class="hs-identifier hs-type">TargetSet</span></a></span><span> </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#PDTagged"><span class="hs-identifier hs-type">PDTagged</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.Library.html#Library"><span class="hs-identifier hs-type">Library</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.UnqualComponentName.html#UnqualComponentName"><span class="hs-identifier hs-type">UnqualComponentName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Types.Component.html#Component"><span class="hs-identifier hs-type">Component</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-365"></span><span id="flattenTaggedTargets"><span class="annot"><span class="annottext">flattenTaggedTargets :: TargetSet PDTagged
-&gt; (Maybe Library, [(UnqualComponentName, Component)])
</span><a href="Distribution.PackageDescription.Configuration.html#flattenTaggedTargets"><span class="hs-identifier hs-var hs-var">flattenTaggedTargets</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#TargetSet"><span class="hs-identifier hs-type">TargetSet</span></a></span><span> </span><span id="local-6989586621679694800"><span class="annot"><span class="annottext">[(DependencyMap, PDTagged)]
</span><a href="#local-6989586621679694800"><span class="hs-identifier hs-var">targets</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((DependencyMap, PDTagged)
 -&gt; (Maybe Library, [(UnqualComponentName, Component)])
 -&gt; (Maybe Library, [(UnqualComponentName, Component)]))
-&gt; (Maybe Library, [(UnqualComponentName, Component)])
-&gt; [(DependencyMap, PDTagged)]
-&gt; (Maybe Library, [(UnqualComponentName, Component)])
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="annot"><span class="annottext">(DependencyMap, PDTagged)
-&gt; (Maybe Library, [(UnqualComponentName, Component)])
-&gt; (Maybe Library, [(UnqualComponentName, Component)])
</span><a href="#local-6989586621679694799"><span class="hs-identifier hs-var">untag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe Library
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[(DependencyMap, PDTagged)]
</span><a href="#local-6989586621679694800"><span class="hs-identifier hs-var">targets</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-366"></span><span>  </span><span id="local-6989586621679694799"><span class="annot"><span class="annottext">untag :: (DependencyMap, PDTagged)
-&gt; (Maybe Library, [(UnqualComponentName, Component)])
-&gt; (Maybe Library, [(UnqualComponentName, Component)])
</span><a href="#local-6989586621679694799"><span class="hs-identifier hs-var hs-var">untag</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679694789"><span class="annot"><span class="annottext">DependencyMap
</span><a href="#local-6989586621679694789"><span class="hs-identifier hs-var">depMap</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679694788"><span class="annot"><span class="annottext">PDTagged
</span><a href="#local-6989586621679694788"><span class="hs-identifier hs-var">pdTagged</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679694787"><span class="annot"><span class="annottext">(Maybe Library, [(UnqualComponentName, Component)])
</span><a href="#local-6989586621679694787"><span class="hs-identifier hs-var">accum</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PDTagged
</span><a href="#local-6989586621679694788"><span class="hs-identifier hs-var">pdTagged</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(Maybe Library, [(UnqualComponentName, Component)])
</span><a href="#local-6989586621679694787"><span class="hs-identifier hs-var">accum</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-367"></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#Lib"><span class="hs-identifier hs-type">Lib</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[(UnqualComponentName, Component)]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; (Maybe Library, [(UnqualComponentName, Component)])
forall a. String -&gt; a
</span><a href="Distribution.PackageDescription.Utils.html#userBug"><span class="hs-identifier hs-var">userBug</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Only one library expected&quot;</span></span><span>
</span><span id="line-368"></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#Lib"><span class="hs-identifier hs-type">Lib</span></a></span><span> </span><span id="local-6989586621679694785"><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679694785"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe Library
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679694784"><span class="annot"><span class="annottext">[(UnqualComponentName, Component)]
</span><a href="#local-6989586621679694784"><span class="hs-identifier hs-var">comps</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Library -&gt; Maybe Library
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(Library -&gt; Maybe Library) -&gt; Library -&gt; Maybe Library
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Library -&gt; Library
forall a. HasBuildInfo a =&gt; a -&gt; a
</span><a href="#local-6989586621679694783"><span class="hs-identifier hs-var">redoBD</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679694785"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[(UnqualComponentName, Component)]
</span><a href="#local-6989586621679694784"><span class="hs-identifier hs-var">comps</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-369"></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#SubComp"><span class="hs-identifier hs-type">SubComp</span></a></span><span> </span><span id="local-6989586621679694782"><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694782"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679694781"><span class="annot"><span class="annottext">Component
</span><a href="#local-6989586621679694781"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679694780"><span class="annot"><span class="annottext">Maybe Library
</span><a href="#local-6989586621679694780"><span class="hs-identifier hs-var">mb_lib</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679694779"><span class="annot"><span class="annottext">[(UnqualComponentName, Component)]
</span><a href="#local-6989586621679694779"><span class="hs-identifier hs-var">comps</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-370"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">((UnqualComponentName, Component) -&gt; Bool)
-&gt; [(UnqualComponentName, Component)] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#any"><span class="hs-identifier hs-var">any</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">UnqualComponentName -&gt; UnqualComponentName -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694782"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(UnqualComponentName -&gt; Bool)
-&gt; ((UnqualComponentName, Component) -&gt; UnqualComponentName)
-&gt; (UnqualComponentName, Component)
-&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(UnqualComponentName, Component) -&gt; UnqualComponentName
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[(UnqualComponentName, Component)]
</span><a href="#local-6989586621679694779"><span class="hs-identifier hs-var">comps</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-371"></span><span>        </span><span class="annot"><span class="annottext">String -&gt; (Maybe Library, [(UnqualComponentName, Component)])
forall a. String -&gt; a
</span><a href="Distribution.PackageDescription.Utils.html#userBug"><span class="hs-identifier hs-var">userBug</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; (Maybe Library, [(UnqualComponentName, Component)]))
-&gt; String -&gt; (Maybe Library, [(UnqualComponentName, Component)])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;There exist several components with the same name: '&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694782"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;'&quot;</span></span><span>
</span><span id="line-372"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe Library
</span><a href="#local-6989586621679694780"><span class="hs-identifier hs-var">mb_lib</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694782"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Component -&gt; Component
forall a. HasBuildInfo a =&gt; a -&gt; a
</span><a href="#local-6989586621679694783"><span class="hs-identifier hs-var">redoBD</span></a></span><span> </span><span class="annot"><span class="annottext">Component
</span><a href="#local-6989586621679694781"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(UnqualComponentName, Component)
-&gt; [(UnqualComponentName, Component)]
-&gt; [(UnqualComponentName, Component)]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[(UnqualComponentName, Component)]
</span><a href="#local-6989586621679694779"><span class="hs-identifier hs-var">comps</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-373"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PDTagged
</span><a href="Distribution.PackageDescription.Configuration.html#PDNull"><span class="hs-identifier hs-var">PDNull</span></a></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679694777"><span class="annot"><span class="annottext">(Maybe Library, [(UnqualComponentName, Component)])
</span><a href="#local-6989586621679694777"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(Maybe Library, [(UnqualComponentName, Component)])
</span><a href="#local-6989586621679694777"><span class="hs-identifier hs-var">x</span></a></span><span>  </span><span class="hs-comment">-- actually this should not happen, but let's be liberal</span><span>
</span><span id="line-374"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-375"></span><span>      </span><span id="local-6989586621679695333"><span class="annot"><a href="#local-6989586621679694783"><span class="hs-identifier hs-type">redoBD</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.BuildInfo.Lens.html#HasBuildInfo"><span class="hs-identifier hs-type">L.HasBuildInfo</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679695333"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679695333"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679695333"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-376"></span><span>      </span><span id="local-6989586621679694783"><span class="annot"><span class="annottext">redoBD :: forall a. HasBuildInfo a =&gt; a -&gt; a
</span><a href="#local-6989586621679694783"><span class="hs-identifier hs-var hs-var">redoBD</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ASetter a a [Dependency] [Dependency] -&gt; [Dependency] -&gt; a -&gt; a
forall s t a b. ASetter s t a b -&gt; b -&gt; s -&gt; t
</span><a href="Distribution.Compat.Lens.html#set"><span class="hs-identifier hs-var">set</span></a></span><span> </span><span class="annot"><span class="annottext">ASetter a a [Dependency] [Dependency]
forall a. HasBuildInfo a =&gt; Lens' a [Dependency]
</span><a href="Distribution.Types.BuildInfo.Lens.html#targetBuildDepends"><span class="hs-identifier hs-var">L.targetBuildDepends</span></a></span><span> </span><span class="annot"><span class="annottext">([Dependency] -&gt; a -&gt; a) -&gt; [Dependency] -&gt; a -&gt; a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">DependencyMap -&gt; [Dependency]
</span><a href="Distribution.Types.DependencyMap.html#fromDepMap"><span class="hs-identifier hs-var">fromDepMap</span></a></span><span> </span><span class="annot"><span class="annottext">DependencyMap
</span><a href="#local-6989586621679694789"><span class="hs-identifier hs-var">depMap</span></a></span><span>
</span><span id="line-377"></span><span>
</span><span id="line-378"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-379"></span><span class="hs-comment">-- Convert GenericPackageDescription to PackageDescription</span><span>
</span><span id="line-380"></span><span class="hs-comment">--</span><span>
</span><span id="line-381"></span><span>
</span><span id="line-382"></span><span class="hs-keyword">data</span><span> </span><span id="PDTagged"><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#PDTagged"><span class="hs-identifier hs-var">PDTagged</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Lib"><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#Lib"><span class="hs-identifier hs-var">Lib</span></a></span></span><span> </span><span class="annot"><a href="Distribution.Types.Library.html#Library"><span class="hs-identifier hs-type">Library</span></a></span><span>
</span><span id="line-383"></span><span>              </span><span class="hs-glyph">|</span><span> </span><span id="SubComp"><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#SubComp"><span class="hs-identifier hs-var">SubComp</span></a></span></span><span> </span><span class="annot"><a href="Distribution.Types.UnqualComponentName.html#UnqualComponentName"><span class="hs-identifier hs-type">UnqualComponentName</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.Component.html#Component"><span class="hs-identifier hs-type">Component</span></a></span><span>
</span><span id="line-384"></span><span>              </span><span class="hs-glyph">|</span><span> </span><span id="PDNull"><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#PDNull"><span class="hs-identifier hs-var">PDNull</span></a></span></span><span>
</span><span id="line-385"></span><span>              </span><span class="hs-keyword">deriving</span><span> </span><span id="local-6989586621679694757"><span id="local-6989586621679694759"><span id="local-6989586621679694770"><span class="annot"><span class="annottext">Int -&gt; PDTagged -&gt; String -&gt; String
[PDTagged] -&gt; String -&gt; String
PDTagged -&gt; String
(Int -&gt; PDTagged -&gt; String -&gt; String)
-&gt; (PDTagged -&gt; String)
-&gt; ([PDTagged] -&gt; String -&gt; String)
-&gt; Show PDTagged
forall a.
(Int -&gt; a -&gt; String -&gt; String)
-&gt; (a -&gt; String) -&gt; ([a] -&gt; String -&gt; String) -&gt; Show a
showList :: [PDTagged] -&gt; String -&gt; String
$cshowList :: [PDTagged] -&gt; String -&gt; String
show :: PDTagged -&gt; String
$cshow :: PDTagged -&gt; String
showsPrec :: Int -&gt; PDTagged -&gt; String -&gt; String
$cshowsPrec :: Int -&gt; PDTagged -&gt; String -&gt; String
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span>
</span><span id="line-386"></span><span>
</span><span id="line-387"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679694750"><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#PDTagged"><span class="hs-identifier hs-type">PDTagged</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-388"></span><span>    </span><span id="local-6989586621679694749"><span class="annot"><span class="annottext">mempty :: PDTagged
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var hs-var hs-var hs-var">mempty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PDTagged
</span><a href="Distribution.PackageDescription.Configuration.html#PDNull"><span class="hs-identifier hs-var">PDNull</span></a></span><span>
</span><span id="line-389"></span><span>    </span><span id="local-6989586621679694747"><span class="annot"><span class="annottext">mappend :: PDTagged -&gt; PDTagged -&gt; PDTagged
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-identifier hs-var hs-var hs-var hs-var">mappend</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PDTagged -&gt; PDTagged -&gt; PDTagged
forall a. Semigroup a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">(&lt;&gt;)</span></a></span><span>
</span><span id="line-390"></span><span>
</span><span id="line-391"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679694742"><span id="local-6989586621679694744"><span class="annot"><a href="../../base/src/GHC.Base.html#Semigroup"><span class="hs-identifier hs-type">Semigroup</span></a></span><span> </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#PDTagged"><span class="hs-identifier hs-type">PDTagged</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-392"></span><span>    </span><span class="annot"><span class="annottext">PDTagged
</span><a href="Distribution.PackageDescription.Configuration.html#PDNull"><span class="hs-identifier hs-var">PDNull</span></a></span><span>    </span><span id="local-6989586621679694736"><span class="annot"><span class="annottext">&lt;&gt; :: PDTagged -&gt; PDTagged -&gt; PDTagged
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;&gt;</span></a></span></span><span> </span><span id="local-6989586621679694735"><span class="annot"><span class="annottext">PDTagged
</span><a href="#local-6989586621679694735"><span class="hs-identifier hs-var">x</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PDTagged
</span><a href="#local-6989586621679694735"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-393"></span><span>    </span><span id="local-6989586621679694734"><span class="annot"><span class="annottext">PDTagged
</span><a href="#local-6989586621679694734"><span class="hs-identifier hs-var">x</span></a></span></span><span>         </span><span class="annot"><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">PDTagged
</span><a href="Distribution.PackageDescription.Configuration.html#PDNull"><span class="hs-identifier hs-var">PDNull</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PDTagged
</span><a href="#local-6989586621679694734"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-394"></span><span>    </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#Lib"><span class="hs-identifier hs-type">Lib</span></a></span><span> </span><span id="local-6989586621679694733"><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679694733"><span class="hs-identifier hs-var">l</span></a></span></span><span>     </span><span class="annot"><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#Lib"><span class="hs-identifier hs-type">Lib</span></a></span><span> </span><span id="local-6989586621679694732"><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679694732"><span class="hs-identifier hs-var">l'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Library -&gt; PDTagged
</span><a href="Distribution.PackageDescription.Configuration.html#Lib"><span class="hs-identifier hs-var">Lib</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679694733"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">Library -&gt; Library -&gt; Library
forall a. Semigroup a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679694732"><span class="hs-identifier hs-var">l'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-395"></span><span>    </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#SubComp"><span class="hs-identifier hs-type">SubComp</span></a></span><span> </span><span id="local-6989586621679694731"><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694731"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679694730"><span class="annot"><span class="annottext">Component
</span><a href="#local-6989586621679694730"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#SubComp"><span class="hs-identifier hs-type">SubComp</span></a></span><span> </span><span id="local-6989586621679694729"><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694729"><span class="hs-identifier hs-var">n'</span></a></span></span><span> </span><span id="local-6989586621679694728"><span class="annot"><span class="annottext">Component
</span><a href="#local-6989586621679694728"><span class="hs-identifier hs-var">x'</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694731"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; UnqualComponentName -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694729"><span class="hs-identifier hs-var">n'</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; Component -&gt; PDTagged
</span><a href="Distribution.PackageDescription.Configuration.html#SubComp"><span class="hs-identifier hs-var">SubComp</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694731"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Component
</span><a href="#local-6989586621679694730"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Component -&gt; Component -&gt; Component
forall a. Semigroup a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Component
</span><a href="#local-6989586621679694728"><span class="hs-identifier hs-var">x'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-396"></span><span>    </span><span class="annot"><span class="annottext">PDTagged
</span><span class="hs-identifier">_</span></span><span>         </span><span class="annot"><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">PDTagged
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; PDTagged
forall a. String -&gt; a
</span><a href="Distribution.PackageDescription.Utils.html#cabalBug"><span class="hs-identifier hs-var">cabalBug</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Cannot combine incompatible tags&quot;</span></span><span>
</span><span id="line-397"></span><span>
</span><span id="line-398"></span><span class="hs-comment">-- | Create a package description with all configurations resolved.</span><span>
</span><span id="line-399"></span><span class="hs-comment">--</span><span>
</span><span id="line-400"></span><span class="hs-comment">-- This function takes a `GenericPackageDescription` and several environment</span><span>
</span><span id="line-401"></span><span class="hs-comment">-- parameters and tries to generate `PackageDescription` by finding a flag</span><span>
</span><span id="line-402"></span><span class="hs-comment">-- assignment that result in satisfiable dependencies.</span><span>
</span><span id="line-403"></span><span class="hs-comment">--</span><span>
</span><span id="line-404"></span><span class="hs-comment">-- It takes as inputs a not necessarily complete specifications of flags</span><span>
</span><span id="line-405"></span><span class="hs-comment">-- assignments, an optional package index as well as platform parameters.  If</span><span>
</span><span id="line-406"></span><span class="hs-comment">-- some flags are not assigned explicitly, this function will try to pick an</span><span>
</span><span id="line-407"></span><span class="hs-comment">-- assignment that causes this function to succeed.  The package index is</span><span>
</span><span id="line-408"></span><span class="hs-comment">-- optional since on some platforms we cannot determine which packages have</span><span>
</span><span id="line-409"></span><span class="hs-comment">-- been installed before.  When no package index is supplied, every dependency</span><span>
</span><span id="line-410"></span><span class="hs-comment">-- is assumed to be satisfiable, therefore all not explicitly assigned flags</span><span>
</span><span id="line-411"></span><span class="hs-comment">-- will get their default values.</span><span>
</span><span id="line-412"></span><span class="hs-comment">--</span><span>
</span><span id="line-413"></span><span class="hs-comment">-- This function will fail if it cannot find a flag assignment that leads to</span><span>
</span><span id="line-414"></span><span class="hs-comment">-- satisfiable dependencies.  (It will not try alternative assignments for</span><span>
</span><span id="line-415"></span><span class="hs-comment">-- explicitly specified flags.)  In case of failure it will return the missing</span><span>
</span><span id="line-416"></span><span class="hs-comment">-- dependencies that it encountered when trying different flag assignments.</span><span>
</span><span id="line-417"></span><span class="hs-comment">-- On success, it will return the package description and the full flag</span><span>
</span><span id="line-418"></span><span class="hs-comment">-- assignment chosen.</span><span>
</span><span id="line-419"></span><span class="hs-comment">--</span><span>
</span><span id="line-420"></span><span class="hs-comment">-- Note that this drops any stanzas which have @buildable: False@.  While</span><span>
</span><span id="line-421"></span><span class="hs-comment">-- this is arguably the right thing to do, it means we give bad error</span><span>
</span><span id="line-422"></span><span class="hs-comment">-- messages in some situations, see #3858.</span><span>
</span><span id="line-423"></span><span class="hs-comment">--</span><span>
</span><span id="line-424"></span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#finalizePD"><span class="hs-identifier hs-type">finalizePD</span></a></span><span> </span><span class="hs-glyph">::</span><span>
</span><span id="line-425"></span><span>     </span><span class="annot"><a href="Distribution.Types.Flag.html#FlagAssignment"><span class="hs-identifier hs-type">FlagAssignment</span></a></span><span>  </span><span class="hs-comment">-- ^ Explicitly specified flag assignments</span><span>
</span><span id="line-426"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentRequestedSpec.html#ComponentRequestedSpec"><span class="hs-identifier hs-type">ComponentRequestedSpec</span></a></span><span>
</span><span id="line-427"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.Dependency.html#Dependency"><span class="hs-identifier hs-type">Dependency</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- ^ Is a given dependency satisfiable from the set of</span><span>
</span><span id="line-428"></span><span>                          </span><span class="hs-comment">-- available packages?  If this is unknown then use</span><span>
</span><span id="line-429"></span><span>                          </span><span class="hs-comment">-- True.</span><span>
</span><span id="line-430"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.System.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span>      </span><span class="hs-comment">-- ^ The 'Arch' and 'OS'</span><span>
</span><span id="line-431"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Compiler.html#CompilerInfo"><span class="hs-identifier hs-type">CompilerInfo</span></a></span><span>  </span><span class="hs-comment">-- ^ Compiler information</span><span>
</span><span id="line-432"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.PackageVersionConstraint.html#PackageVersionConstraint"><span class="hs-identifier hs-type">PackageVersionConstraint</span></a></span><span class="hs-special">]</span><span>  </span><span class="hs-comment">-- ^ Additional constraints</span><span>
</span><span id="line-433"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.GenericPackageDescription.html#GenericPackageDescription"><span class="hs-identifier hs-type">GenericPackageDescription</span></a></span><span>
</span><span id="line-434"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.Dependency.html#Dependency"><span class="hs-identifier hs-type">Dependency</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-435"></span><span>            </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Types.Flag.html#FlagAssignment"><span class="hs-identifier hs-type">FlagAssignment</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-436"></span><span>             </span><span class="hs-comment">-- ^ Either missing dependencies or the resolved package</span><span>
</span><span id="line-437"></span><span>             </span><span class="hs-comment">-- description along with the flag assignments chosen.</span><span>
</span><span id="line-438"></span><span id="finalizePD"><span class="annot"><span class="annottext">finalizePD :: FlagAssignment
-&gt; ComponentRequestedSpec
-&gt; (Dependency -&gt; Bool)
-&gt; Platform
-&gt; CompilerInfo
-&gt; [PackageVersionConstraint]
-&gt; GenericPackageDescription
-&gt; Either [Dependency] (PackageDescription, FlagAssignment)
</span><a href="Distribution.PackageDescription.Configuration.html#finalizePD"><span class="hs-identifier hs-var hs-var">finalizePD</span></a></span></span><span> </span><span id="local-6989586621679694726"><span class="annot"><span class="annottext">FlagAssignment
</span><a href="#local-6989586621679694726"><span class="hs-identifier hs-var">userflags</span></a></span></span><span> </span><span id="local-6989586621679694725"><span class="annot"><span class="annottext">ComponentRequestedSpec
</span><a href="#local-6989586621679694725"><span class="hs-identifier hs-var">enabled</span></a></span></span><span> </span><span id="local-6989586621679694724"><span class="annot"><span class="annottext">Dependency -&gt; Bool
</span><a href="#local-6989586621679694724"><span class="hs-identifier hs-var">satisfyDep</span></a></span></span><span>
</span><span id="line-439"></span><span>        </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.System.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span id="local-6989586621679694722"><span class="annot"><span class="annottext">Arch
</span><a href="#local-6989586621679694722"><span class="hs-identifier hs-var">arch</span></a></span></span><span> </span><span id="local-6989586621679694721"><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679694721"><span class="hs-identifier hs-var">os</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679694720"><span class="annot"><span class="annottext">CompilerInfo
</span><a href="#local-6989586621679694720"><span class="hs-identifier hs-var">impl</span></a></span></span><span> </span><span id="local-6989586621679694719"><span class="annot"><span class="annottext">[PackageVersionConstraint]
</span><a href="#local-6989586621679694719"><span class="hs-identifier hs-var">constraints</span></a></span></span><span>
</span><span id="line-440"></span><span>        </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.GenericPackageDescription.html#GenericPackageDescription"><span class="hs-identifier hs-type">GenericPackageDescription</span></a></span><span> </span><span id="local-6989586621679694717"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679694717"><span class="hs-identifier hs-var">pkg</span></a></span></span><span> </span><span id="local-6989586621679694716"><span class="annot"><span class="annottext">Maybe Version
</span><a href="#local-6989586621679694716"><span class="hs-identifier hs-var">_ver</span></a></span></span><span> </span><span id="local-6989586621679694715"><span class="annot"><span class="annottext">[PackageFlag]
</span><a href="#local-6989586621679694715"><span class="hs-identifier hs-var">flags</span></a></span></span><span> </span><span id="local-6989586621679694714"><span class="annot"><span class="annottext">Maybe (CondTree ConfVar [Dependency] Library)
</span><a href="#local-6989586621679694714"><span class="hs-identifier hs-var">mb_lib0</span></a></span></span><span> </span><span id="local-6989586621679694713"><span class="annot"><span class="annottext">[(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
</span><a href="#local-6989586621679694713"><span class="hs-identifier hs-var">sub_libs0</span></a></span></span><span> </span><span id="local-6989586621679694712"><span class="annot"><span class="annottext">[(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)]
</span><a href="#local-6989586621679694712"><span class="hs-identifier hs-var">flibs0</span></a></span></span><span> </span><span id="local-6989586621679694711"><span class="annot"><span class="annottext">[(UnqualComponentName, CondTree ConfVar [Dependency] Executable)]
</span><a href="#local-6989586621679694711"><span class="hs-identifier hs-var">exes0</span></a></span></span><span> </span><span id="local-6989586621679694710"><span class="annot"><span class="annottext">[(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
</span><a href="#local-6989586621679694710"><span class="hs-identifier hs-var">tests0</span></a></span></span><span> </span><span id="local-6989586621679694709"><span class="annot"><span class="annottext">[(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
</span><a href="#local-6989586621679694709"><span class="hs-identifier hs-var">bms0</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-441"></span><span>  </span><span class="hs-special">(</span><span id="local-6989586621679694708"><span class="annot"><span class="annottext">TargetSet PDTagged
</span><a href="#local-6989586621679694708"><span class="hs-identifier hs-var">targetSet</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679694707"><span class="annot"><span class="annottext">FlagAssignment
</span><a href="#local-6989586621679694707"><span class="hs-identifier hs-var">flagVals</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span>
</span><span id="line-442"></span><span>    </span><span class="annot"><span class="annottext">[(FlagName, [Bool])]
-&gt; ComponentRequestedSpec
-&gt; OS
-&gt; Arch
-&gt; CompilerInfo
-&gt; [PackageVersionConstraint]
-&gt; [CondTree ConfVar [Dependency] PDTagged]
-&gt; ([Dependency] -&gt; DepTestRslt [Dependency])
-&gt; Either [Dependency] (TargetSet PDTagged, FlagAssignment)
</span><a href="Distribution.PackageDescription.Configuration.html#resolveWithFlags"><span class="hs-identifier hs-var">resolveWithFlags</span></a></span><span> </span><span class="annot"><span class="annottext">[(FlagName, [Bool])]
</span><a href="#local-6989586621679694706"><span class="hs-identifier hs-var">flagChoices</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentRequestedSpec
</span><a href="#local-6989586621679694725"><span class="hs-identifier hs-var">enabled</span></a></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679694721"><span class="hs-identifier hs-var">os</span></a></span><span> </span><span class="annot"><span class="annottext">Arch
</span><a href="#local-6989586621679694722"><span class="hs-identifier hs-var">arch</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerInfo
</span><a href="#local-6989586621679694720"><span class="hs-identifier hs-var">impl</span></a></span><span> </span><span class="annot"><span class="annottext">[PackageVersionConstraint]
</span><a href="#local-6989586621679694719"><span class="hs-identifier hs-var">constraints</span></a></span><span> </span><span class="annot"><span class="annottext">[CondTree ConfVar [Dependency] PDTagged]
</span><a href="#local-6989586621679694705"><span class="hs-identifier hs-var">condTrees</span></a></span><span> </span><span class="annot"><span class="annottext">[Dependency] -&gt; DepTestRslt [Dependency]
</span><a href="#local-6989586621679694704"><span class="hs-identifier hs-var">check</span></a></span><span>
</span><span id="line-443"></span><span>  </span><span class="hs-keyword">let</span><span>
</span><span id="line-444"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679694703"><span class="annot"><span class="annottext">Maybe Library
</span><a href="#local-6989586621679694703"><span class="hs-identifier hs-var">mb_lib</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679694702"><span class="annot"><span class="annottext">[(UnqualComponentName, Component)]
</span><a href="#local-6989586621679694702"><span class="hs-identifier hs-var">comps</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TargetSet PDTagged
-&gt; (Maybe Library, [(UnqualComponentName, Component)])
</span><a href="Distribution.PackageDescription.Configuration.html#flattenTaggedTargets"><span class="hs-identifier hs-var">flattenTaggedTargets</span></a></span><span> </span><span class="annot"><span class="annottext">TargetSet PDTagged
</span><a href="#local-6989586621679694708"><span class="hs-identifier hs-var">targetSet</span></a></span><span>
</span><span id="line-445"></span><span>    </span><span id="local-6989586621679694699"><span class="annot"><span class="annottext">mb_lib' :: Maybe Library
</span><a href="#local-6989586621679694699"><span class="hs-identifier hs-var hs-var">mb_lib'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Library -&gt; Library) -&gt; Maybe Library -&gt; Maybe Library
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">Library -&gt; Library
</span><a href="Distribution.PackageDescription.Configuration.html#libFillInDefaults"><span class="hs-identifier hs-var">libFillInDefaults</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Library
</span><a href="#local-6989586621679694703"><span class="hs-identifier hs-var">mb_lib</span></a></span><span>
</span><span id="line-446"></span><span>    </span><span id="local-6989586621679694697"><span class="annot"><span class="annottext">comps' :: [Component]
</span><a href="#local-6989586621679694697"><span class="hs-identifier hs-var hs-var">comps'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(((UnqualComponentName, Component) -&gt; Component)
 -&gt; [(UnqualComponentName, Component)] -&gt; [Component])
-&gt; [(UnqualComponentName, Component)]
-&gt; ((UnqualComponentName, Component) -&gt; Component)
-&gt; [Component]
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">((UnqualComponentName, Component) -&gt; Component)
-&gt; [(UnqualComponentName, Component)] -&gt; [Component]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">[(UnqualComponentName, Component)]
</span><a href="#local-6989586621679694702"><span class="hs-identifier hs-var">comps</span></a></span><span> </span><span class="annot"><span class="annottext">(((UnqualComponentName, Component) -&gt; Component) -&gt; [Component])
-&gt; ((UnqualComponentName, Component) -&gt; Component) -&gt; [Component]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621679694696"><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694696"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679694695"><span class="annot"><span class="annottext">Component
</span><a href="#local-6989586621679694695"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(Library -&gt; Component)
-&gt; (ForeignLib -&gt; Component)
-&gt; (Executable -&gt; Component)
-&gt; (TestSuite -&gt; Component)
-&gt; (Benchmark -&gt; Component)
-&gt; Component
-&gt; Component
forall a.
(Library -&gt; a)
-&gt; (ForeignLib -&gt; a)
-&gt; (Executable -&gt; a)
-&gt; (TestSuite -&gt; a)
-&gt; (Benchmark -&gt; a)
-&gt; Component
-&gt; a
</span><a href="Distribution.Types.Component.html#foldComponent"><span class="hs-identifier hs-var">foldComponent</span></a></span><span>
</span><span id="line-447"></span><span>      </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679694693"><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679694693"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Library -&gt; Component
</span><a href="Distribution.Types.Component.html#CLib"><span class="hs-identifier hs-var">CLib</span></a></span><span>   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Library -&gt; Library
</span><a href="Distribution.PackageDescription.Configuration.html#libFillInDefaults"><span class="hs-identifier hs-var">libFillInDefaults</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679694693"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">)</span><span>   </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">libName :: LibraryName
</span><a href="Distribution.Types.Library.html#libName"><span class="hs-identifier hs-var">libName</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; LibraryName
</span><a href="Distribution.Types.LibraryName.html#LSubLibName"><span class="hs-identifier hs-var">LSubLibName</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694696"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-448"></span><span>                                            </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">libExposed :: Bool
</span><a href="Distribution.Types.Library.html#libExposed"><span class="hs-identifier hs-var">libExposed</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-449"></span><span>      </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679694690"><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679694690"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ForeignLib -&gt; Component
</span><a href="Distribution.Types.Component.html#CFLib"><span class="hs-identifier hs-var">CFLib</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ForeignLib -&gt; ForeignLib
</span><a href="Distribution.PackageDescription.Configuration.html#flibFillInDefaults"><span class="hs-identifier hs-var">flibFillInDefaults</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679694690"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">)</span><span>  </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">foreignLibName :: UnqualComponentName
</span><a href="Distribution.Types.ForeignLib.html#foreignLibName"><span class="hs-identifier hs-var">foreignLibName</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694696"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-450"></span><span>      </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679694687"><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679694687"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Executable -&gt; Component
</span><a href="Distribution.Types.Component.html#CExe"><span class="hs-identifier hs-var">CExe</span></a></span><span>   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Executable -&gt; Executable
</span><a href="Distribution.PackageDescription.Configuration.html#exeFillInDefaults"><span class="hs-identifier hs-var">exeFillInDefaults</span></a></span><span> </span><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679694687"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span>   </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">exeName :: UnqualComponentName
</span><a href="Distribution.Types.Executable.html#exeName"><span class="hs-identifier hs-var">exeName</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694696"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-451"></span><span>      </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679694684"><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679694684"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">TestSuite -&gt; Component
</span><a href="Distribution.Types.Component.html#CTest"><span class="hs-identifier hs-var">CTest</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TestSuite -&gt; TestSuite
</span><a href="Distribution.PackageDescription.Configuration.html#testFillInDefaults"><span class="hs-identifier hs-var">testFillInDefaults</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679694684"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span>  </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">testName :: UnqualComponentName
</span><a href="Distribution.Types.TestSuite.html#testName"><span class="hs-identifier hs-var">testName</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694696"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-452"></span><span>      </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679694681"><span class="annot"><span class="annottext">Benchmark
</span><a href="#local-6989586621679694681"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Benchmark -&gt; Component
</span><a href="Distribution.Types.Component.html#CBench"><span class="hs-identifier hs-var">CBench</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Benchmark -&gt; Benchmark
</span><a href="Distribution.PackageDescription.Configuration.html#benchFillInDefaults"><span class="hs-identifier hs-var">benchFillInDefaults</span></a></span><span> </span><span class="annot"><span class="annottext">Benchmark
</span><a href="#local-6989586621679694681"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">benchmarkName :: UnqualComponentName
</span><a href="Distribution.Types.Benchmark.html#benchmarkName"><span class="hs-identifier hs-var">benchmarkName</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694696"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-453"></span><span>      </span><span class="annot"><span class="annottext">Component
</span><a href="#local-6989586621679694695"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-454"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679694678"><span class="annot"><span class="annottext">[Library]
</span><a href="#local-6989586621679694678"><span class="hs-identifier hs-var">sub_libs'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679694677"><span class="annot"><span class="annottext">[ForeignLib]
</span><a href="#local-6989586621679694677"><span class="hs-identifier hs-var">flibs'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679694676"><span class="annot"><span class="annottext">[Executable]
</span><a href="#local-6989586621679694676"><span class="hs-identifier hs-var">exes'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679694675"><span class="annot"><span class="annottext">[TestSuite]
</span><a href="#local-6989586621679694675"><span class="hs-identifier hs-var">tests'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679694674"><span class="annot"><span class="annottext">[Benchmark]
</span><a href="#local-6989586621679694674"><span class="hs-identifier hs-var">bms'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Component]
-&gt; ([Library], [ForeignLib], [Executable], [TestSuite],
    [Benchmark])
</span><a href="Distribution.Types.Component.html#partitionComponents"><span class="hs-identifier hs-var">partitionComponents</span></a></span><span> </span><span class="annot"><span class="annottext">[Component]
</span><a href="#local-6989586621679694697"><span class="hs-identifier hs-var">comps'</span></a></span><span>
</span><span id="line-455"></span><span>  </span><span class="annot"><span class="annottext">(PackageDescription, FlagAssignment)
-&gt; Either [Dependency] (PackageDescription, FlagAssignment)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679694717"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">library :: Maybe Library
</span><a href="Distribution.Types.PackageDescription.html#library"><span class="hs-identifier hs-var">library</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Library
</span><a href="#local-6989586621679694699"><span class="hs-identifier hs-var">mb_lib'</span></a></span><span>
</span><span id="line-456"></span><span>               </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">subLibraries :: [Library]
</span><a href="Distribution.Types.PackageDescription.html#subLibraries"><span class="hs-identifier hs-var">subLibraries</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Library]
</span><a href="#local-6989586621679694678"><span class="hs-identifier hs-var">sub_libs'</span></a></span><span>
</span><span id="line-457"></span><span>               </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">foreignLibs :: [ForeignLib]
</span><a href="Distribution.Types.PackageDescription.html#foreignLibs"><span class="hs-identifier hs-var">foreignLibs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ForeignLib]
</span><a href="#local-6989586621679694677"><span class="hs-identifier hs-var">flibs'</span></a></span><span>
</span><span id="line-458"></span><span>               </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">executables :: [Executable]
</span><a href="Distribution.Types.PackageDescription.html#executables"><span class="hs-identifier hs-var">executables</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Executable]
</span><a href="#local-6989586621679694676"><span class="hs-identifier hs-var">exes'</span></a></span><span>
</span><span id="line-459"></span><span>               </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">testSuites :: [TestSuite]
</span><a href="Distribution.Types.PackageDescription.html#testSuites"><span class="hs-identifier hs-var">testSuites</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[TestSuite]
</span><a href="#local-6989586621679694675"><span class="hs-identifier hs-var">tests'</span></a></span><span>
</span><span id="line-460"></span><span>               </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">benchmarks :: [Benchmark]
</span><a href="Distribution.Types.PackageDescription.html#benchmarks"><span class="hs-identifier hs-var">benchmarks</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Benchmark]
</span><a href="#local-6989586621679694674"><span class="hs-identifier hs-var">bms'</span></a></span><span>
</span><span id="line-461"></span><span>               </span><span class="hs-special">}</span><span>
</span><span id="line-462"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FlagAssignment
</span><a href="#local-6989586621679694707"><span class="hs-identifier hs-var">flagVals</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-463"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-464"></span><span>    </span><span class="hs-comment">-- Combine lib, exes, and tests into one list of @CondTree@s with tagged data</span><span>
</span><span id="line-465"></span><span>    </span><span id="local-6989586621679694705"><span class="annot"><span class="annottext">condTrees :: [CondTree ConfVar [Dependency] PDTagged]
</span><a href="#local-6989586621679694705"><span class="hs-identifier hs-var hs-var">condTrees</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>    </span><span class="annot"><span class="annottext">Maybe (CondTree ConfVar [Dependency] PDTagged)
-&gt; [CondTree ConfVar [Dependency] PDTagged]
forall a. Maybe a -&gt; [a]
</span><a href="../../base/src/Data.Maybe.html#maybeToList"><span class="hs-identifier hs-var">maybeToList</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(CondTree ConfVar [Dependency] Library
 -&gt; CondTree ConfVar [Dependency] PDTagged)
-&gt; Maybe (CondTree ConfVar [Dependency] Library)
-&gt; Maybe (CondTree ConfVar [Dependency] PDTagged)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Library -&gt; PDTagged)
-&gt; CondTree ConfVar [Dependency] Library
-&gt; CondTree ConfVar [Dependency] PDTagged
forall a b v c. (a -&gt; b) -&gt; CondTree v c a -&gt; CondTree v c b
</span><a href="Distribution.Types.CondTree.html#mapTreeData"><span class="hs-identifier hs-var">mapTreeData</span></a></span><span> </span><span class="annot"><span class="annottext">Library -&gt; PDTagged
</span><a href="Distribution.PackageDescription.Configuration.html#Lib"><span class="hs-identifier hs-var">Lib</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe (CondTree ConfVar [Dependency] Library)
</span><a href="#local-6989586621679694714"><span class="hs-identifier hs-var">mb_lib0</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-466"></span><span>                </span><span class="annot"><span class="annottext">[CondTree ConfVar [Dependency] PDTagged]
-&gt; [CondTree ConfVar [Dependency] PDTagged]
-&gt; [CondTree ConfVar [Dependency] PDTagged]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">((UnqualComponentName, CondTree ConfVar [Dependency] Library)
 -&gt; CondTree ConfVar [Dependency] PDTagged)
-&gt; [(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
-&gt; [CondTree ConfVar [Dependency] PDTagged]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621679694665"><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694665"><span class="hs-identifier hs-var">name</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679694664"><span class="annot"><span class="annottext">CondTree ConfVar [Dependency] Library
</span><a href="#local-6989586621679694664"><span class="hs-identifier hs-var">tree</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(Library -&gt; PDTagged)
-&gt; CondTree ConfVar [Dependency] Library
-&gt; CondTree ConfVar [Dependency] PDTagged
forall a b v c. (a -&gt; b) -&gt; CondTree v c a -&gt; CondTree v c b
</span><a href="Distribution.Types.CondTree.html#mapTreeData"><span class="hs-identifier hs-var">mapTreeData</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UnqualComponentName -&gt; Component -&gt; PDTagged
</span><a href="Distribution.PackageDescription.Configuration.html#SubComp"><span class="hs-identifier hs-var">SubComp</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694665"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">(Component -&gt; PDTagged)
-&gt; (Library -&gt; Component) -&gt; Library -&gt; PDTagged
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Library -&gt; Component
</span><a href="Distribution.Types.Component.html#CLib"><span class="hs-identifier hs-var">CLib</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CondTree ConfVar [Dependency] Library
</span><a href="#local-6989586621679694664"><span class="hs-identifier hs-var">tree</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
</span><a href="#local-6989586621679694713"><span class="hs-identifier hs-var">sub_libs0</span></a></span><span>
</span><span id="line-467"></span><span>                </span><span class="annot"><span class="annottext">[CondTree ConfVar [Dependency] PDTagged]
-&gt; [CondTree ConfVar [Dependency] PDTagged]
-&gt; [CondTree ConfVar [Dependency] PDTagged]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">((UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)
 -&gt; CondTree ConfVar [Dependency] PDTagged)
-&gt; [(UnqualComponentName,
     CondTree ConfVar [Dependency] ForeignLib)]
-&gt; [CondTree ConfVar [Dependency] PDTagged]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621679694663"><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694663"><span class="hs-identifier hs-var">name</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679694662"><span class="annot"><span class="annottext">CondTree ConfVar [Dependency] ForeignLib
</span><a href="#local-6989586621679694662"><span class="hs-identifier hs-var">tree</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(ForeignLib -&gt; PDTagged)
-&gt; CondTree ConfVar [Dependency] ForeignLib
-&gt; CondTree ConfVar [Dependency] PDTagged
forall a b v c. (a -&gt; b) -&gt; CondTree v c a -&gt; CondTree v c b
</span><a href="Distribution.Types.CondTree.html#mapTreeData"><span class="hs-identifier hs-var">mapTreeData</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UnqualComponentName -&gt; Component -&gt; PDTagged
</span><a href="Distribution.PackageDescription.Configuration.html#SubComp"><span class="hs-identifier hs-var">SubComp</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694663"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">(Component -&gt; PDTagged)
-&gt; (ForeignLib -&gt; Component) -&gt; ForeignLib -&gt; PDTagged
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib -&gt; Component
</span><a href="Distribution.Types.Component.html#CFLib"><span class="hs-identifier hs-var">CFLib</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CondTree ConfVar [Dependency] ForeignLib
</span><a href="#local-6989586621679694662"><span class="hs-identifier hs-var">tree</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)]
</span><a href="#local-6989586621679694712"><span class="hs-identifier hs-var">flibs0</span></a></span><span>
</span><span id="line-468"></span><span>                </span><span class="annot"><span class="annottext">[CondTree ConfVar [Dependency] PDTagged]
-&gt; [CondTree ConfVar [Dependency] PDTagged]
-&gt; [CondTree ConfVar [Dependency] PDTagged]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">((UnqualComponentName, CondTree ConfVar [Dependency] Executable)
 -&gt; CondTree ConfVar [Dependency] PDTagged)
-&gt; [(UnqualComponentName,
     CondTree ConfVar [Dependency] Executable)]
-&gt; [CondTree ConfVar [Dependency] PDTagged]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621679694661"><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694661"><span class="hs-identifier hs-var">name</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679694660"><span class="annot"><span class="annottext">CondTree ConfVar [Dependency] Executable
</span><a href="#local-6989586621679694660"><span class="hs-identifier hs-var">tree</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(Executable -&gt; PDTagged)
-&gt; CondTree ConfVar [Dependency] Executable
-&gt; CondTree ConfVar [Dependency] PDTagged
forall a b v c. (a -&gt; b) -&gt; CondTree v c a -&gt; CondTree v c b
</span><a href="Distribution.Types.CondTree.html#mapTreeData"><span class="hs-identifier hs-var">mapTreeData</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UnqualComponentName -&gt; Component -&gt; PDTagged
</span><a href="Distribution.PackageDescription.Configuration.html#SubComp"><span class="hs-identifier hs-var">SubComp</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694661"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">(Component -&gt; PDTagged)
-&gt; (Executable -&gt; Component) -&gt; Executable -&gt; PDTagged
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Executable -&gt; Component
</span><a href="Distribution.Types.Component.html#CExe"><span class="hs-identifier hs-var">CExe</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CondTree ConfVar [Dependency] Executable
</span><a href="#local-6989586621679694660"><span class="hs-identifier hs-var">tree</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[(UnqualComponentName, CondTree ConfVar [Dependency] Executable)]
</span><a href="#local-6989586621679694711"><span class="hs-identifier hs-var">exes0</span></a></span><span>
</span><span id="line-469"></span><span>                </span><span class="annot"><span class="annottext">[CondTree ConfVar [Dependency] PDTagged]
-&gt; [CondTree ConfVar [Dependency] PDTagged]
-&gt; [CondTree ConfVar [Dependency] PDTagged]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">((UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)
 -&gt; CondTree ConfVar [Dependency] PDTagged)
-&gt; [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
-&gt; [CondTree ConfVar [Dependency] PDTagged]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621679694659"><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694659"><span class="hs-identifier hs-var">name</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679694658"><span class="annot"><span class="annottext">CondTree ConfVar [Dependency] TestSuite
</span><a href="#local-6989586621679694658"><span class="hs-identifier hs-var">tree</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(TestSuite -&gt; PDTagged)
-&gt; CondTree ConfVar [Dependency] TestSuite
-&gt; CondTree ConfVar [Dependency] PDTagged
forall a b v c. (a -&gt; b) -&gt; CondTree v c a -&gt; CondTree v c b
</span><a href="Distribution.Types.CondTree.html#mapTreeData"><span class="hs-identifier hs-var">mapTreeData</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UnqualComponentName -&gt; Component -&gt; PDTagged
</span><a href="Distribution.PackageDescription.Configuration.html#SubComp"><span class="hs-identifier hs-var">SubComp</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694659"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">(Component -&gt; PDTagged)
-&gt; (TestSuite -&gt; Component) -&gt; TestSuite -&gt; PDTagged
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite -&gt; Component
</span><a href="Distribution.Types.Component.html#CTest"><span class="hs-identifier hs-var">CTest</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CondTree ConfVar [Dependency] TestSuite
</span><a href="#local-6989586621679694658"><span class="hs-identifier hs-var">tree</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
</span><a href="#local-6989586621679694710"><span class="hs-identifier hs-var">tests0</span></a></span><span>
</span><span id="line-470"></span><span>                </span><span class="annot"><span class="annottext">[CondTree ConfVar [Dependency] PDTagged]
-&gt; [CondTree ConfVar [Dependency] PDTagged]
-&gt; [CondTree ConfVar [Dependency] PDTagged]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">((UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)
 -&gt; CondTree ConfVar [Dependency] PDTagged)
-&gt; [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
-&gt; [CondTree ConfVar [Dependency] PDTagged]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621679694657"><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694657"><span class="hs-identifier hs-var">name</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679694656"><span class="annot"><span class="annottext">CondTree ConfVar [Dependency] Benchmark
</span><a href="#local-6989586621679694656"><span class="hs-identifier hs-var">tree</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(Benchmark -&gt; PDTagged)
-&gt; CondTree ConfVar [Dependency] Benchmark
-&gt; CondTree ConfVar [Dependency] PDTagged
forall a b v c. (a -&gt; b) -&gt; CondTree v c a -&gt; CondTree v c b
</span><a href="Distribution.Types.CondTree.html#mapTreeData"><span class="hs-identifier hs-var">mapTreeData</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UnqualComponentName -&gt; Component -&gt; PDTagged
</span><a href="Distribution.PackageDescription.Configuration.html#SubComp"><span class="hs-identifier hs-var">SubComp</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694657"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">(Component -&gt; PDTagged)
-&gt; (Benchmark -&gt; Component) -&gt; Benchmark -&gt; PDTagged
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Benchmark -&gt; Component
</span><a href="Distribution.Types.Component.html#CBench"><span class="hs-identifier hs-var">CBench</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CondTree ConfVar [Dependency] Benchmark
</span><a href="#local-6989586621679694656"><span class="hs-identifier hs-var">tree</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
</span><a href="#local-6989586621679694709"><span class="hs-identifier hs-var">bms0</span></a></span><span>
</span><span id="line-471"></span><span>
</span><span id="line-472"></span><span>    </span><span id="local-6989586621679694706"><span class="annot"><span class="annottext">flagChoices :: [(FlagName, [Bool])]
</span><a href="#local-6989586621679694706"><span class="hs-identifier hs-var hs-var">flagChoices</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(PackageFlag -&gt; (FlagName, [Bool]))
-&gt; [PackageFlag] -&gt; [(FlagName, [Bool])]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.Flag.html#MkPackageFlag"><span class="hs-identifier hs-type">MkPackageFlag</span></a></span><span> </span><span id="local-6989586621679694654"><span class="annot"><span class="annottext">FlagName
</span><a href="#local-6989586621679694654"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679694653"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679694653"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span id="local-6989586621679694652"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679694652"><span class="hs-identifier hs-var">manual</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FlagName
</span><a href="#local-6989586621679694654"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; FlagName -&gt; Bool -&gt; [Bool]
</span><a href="#local-6989586621679694651"><span class="hs-identifier hs-var">d2c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679694652"><span class="hs-identifier hs-var">manual</span></a></span><span> </span><span class="annot"><span class="annottext">FlagName
</span><a href="#local-6989586621679694654"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679694653"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[PackageFlag]
</span><a href="#local-6989586621679694715"><span class="hs-identifier hs-var">flags</span></a></span><span>
</span><span id="line-473"></span><span>    </span><span id="local-6989586621679694651"><span class="annot"><span class="annottext">d2c :: Bool -&gt; FlagName -&gt; Bool -&gt; [Bool]
</span><a href="#local-6989586621679694651"><span class="hs-identifier hs-var hs-var">d2c</span></a></span></span><span> </span><span id="local-6989586621679694650"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679694650"><span class="hs-identifier hs-var">manual</span></a></span></span><span> </span><span id="local-6989586621679694649"><span class="annot"><span class="annottext">FlagName
</span><a href="#local-6989586621679694649"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679694648"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679694648"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">FlagName -&gt; FlagAssignment -&gt; Maybe Bool
</span><a href="Distribution.Types.Flag.html#lookupFlagAssignment"><span class="hs-identifier hs-var">lookupFlagAssignment</span></a></span><span> </span><span class="annot"><span class="annottext">FlagName
</span><a href="#local-6989586621679694649"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">FlagAssignment
</span><a href="#local-6989586621679694726"><span class="hs-identifier hs-var">userflags</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-474"></span><span>                     </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679694647"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679694647"><span class="hs-identifier hs-var">val</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679694647"><span class="hs-identifier hs-var">val</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-475"></span><span>                     </span><span class="annot"><span class="annottext">Maybe Bool
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-476"></span><span>                      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679694650"><span class="hs-identifier hs-var">manual</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679694648"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-477"></span><span>                      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679694648"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679694648"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-478"></span><span>    </span><span class="hs-comment">--flagDefaults = map (\(n,x:_) -&gt; (n,x)) flagChoices</span><span>
</span><span id="line-479"></span><span>    </span><span id="local-6989586621679694704"><span class="annot"><span class="annottext">check :: [Dependency] -&gt; DepTestRslt [Dependency]
</span><a href="#local-6989586621679694704"><span class="hs-identifier hs-var hs-var">check</span></a></span></span><span> </span><span id="local-6989586621679694644"><span class="annot"><span class="annottext">[Dependency]
</span><a href="#local-6989586621679694644"><span class="hs-identifier hs-var">ds</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679694643"><span class="annot"><span class="annottext">missingDeps :: [Dependency]
</span><a href="#local-6989586621679694643"><span class="hs-identifier hs-var hs-var">missingDeps</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Dependency -&gt; Bool) -&gt; [Dependency] -&gt; [Dependency]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Bool) -&gt; (Dependency -&gt; Bool) -&gt; Dependency -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Dependency -&gt; Bool
</span><a href="#local-6989586621679694724"><span class="hs-identifier hs-var">satisfyDep</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Dependency]
</span><a href="#local-6989586621679694644"><span class="hs-identifier hs-var">ds</span></a></span><span>
</span><span id="line-480"></span><span>                   </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">[Dependency] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[Dependency]
</span><a href="#local-6989586621679694643"><span class="hs-identifier hs-var">missingDeps</span></a></span><span>
</span><span id="line-481"></span><span>                      </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">DepTestRslt [Dependency]
forall d. DepTestRslt d
</span><a href="Distribution.PackageDescription.Configuration.html#DepOk"><span class="hs-identifier hs-var">DepOk</span></a></span><span>
</span><span id="line-482"></span><span>                      </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">[Dependency] -&gt; DepTestRslt [Dependency]
forall d. d -&gt; DepTestRslt d
</span><a href="Distribution.PackageDescription.Configuration.html#MissingDeps"><span class="hs-identifier hs-var">MissingDeps</span></a></span><span> </span><span class="annot"><span class="annottext">[Dependency]
</span><a href="#local-6989586621679694643"><span class="hs-identifier hs-var">missingDeps</span></a></span><span>
</span><span id="line-483"></span><span>
</span><span id="line-484"></span><span class="hs-comment">{-
let tst_p = (CondNode [1::Int] [Distribution.Package.Dependency &quot;a&quot; AnyVersion] [])
let tst_p2 = (CondNode [1::Int] [Distribution.Package.Dependency &quot;a&quot; (EarlierVersion (Version [1,0] [])), Distribution.Package.Dependency &quot;a&quot; (LaterVersion (Version [2,0] []))] [])

let p_index = Distribution.Simple.PackageIndex.fromList [Distribution.Package.PackageIdentifier &quot;a&quot; (Version [0,5] []), Distribution.Package.PackageIdentifier &quot;a&quot; (Version [2,5] [])]
let look = not . null . Distribution.Simple.PackageIndex.lookupDependency p_index
let looks ds = mconcat $ map (\d -&gt; if look d then DepOk else MissingDeps [d]) ds
resolveWithFlags [] Distribution.System.Linux Distribution.System.I386 (Distribution.Compiler.GHC,Version [6,8,2] []) [tst_p] looks   ===&gt;  Right ...
resolveWithFlags [] Distribution.System.Linux Distribution.System.I386 (Distribution.Compiler.GHC,Version [6,8,2] []) [tst_p2] looks  ===&gt;  Left ...
-}</span><span>
</span><span id="line-494"></span><span>
</span><span id="line-495"></span><span class="hs-comment">-- | Flatten a generic package description by ignoring all conditions and just</span><span>
</span><span id="line-496"></span><span class="hs-comment">-- join the field descriptors into on package description.  Note, however,</span><span>
</span><span id="line-497"></span><span class="hs-comment">-- that this may lead to inconsistent field values, since all values are</span><span>
</span><span id="line-498"></span><span class="hs-comment">-- joined into one field, which may not be possible in the original package</span><span>
</span><span id="line-499"></span><span class="hs-comment">-- description, due to the use of exclusive choices (if ... else ...).</span><span>
</span><span id="line-500"></span><span class="hs-comment">--</span><span>
</span><span id="line-501"></span><span class="hs-comment">-- TODO: One particularly tricky case is defaulting.  In the original package</span><span>
</span><span id="line-502"></span><span class="hs-comment">-- description, e.g., the source directory might either be the default or a</span><span>
</span><span id="line-503"></span><span class="hs-comment">-- certain, explicitly set path.  Since defaults are filled in only after the</span><span>
</span><span id="line-504"></span><span class="hs-comment">-- package has been resolved and when no explicit value has been set, the</span><span>
</span><span id="line-505"></span><span class="hs-comment">-- default path will be missing from the package description returned by this</span><span>
</span><span id="line-506"></span><span class="hs-comment">-- function.</span><span>
</span><span id="line-507"></span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#flattenPackageDescription"><span class="hs-identifier hs-type">flattenPackageDescription</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.GenericPackageDescription.html#GenericPackageDescription"><span class="hs-identifier hs-type">GenericPackageDescription</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span>
</span><span id="line-508"></span><span id="flattenPackageDescription"><span class="annot"><span class="annottext">flattenPackageDescription :: GenericPackageDescription -&gt; PackageDescription
</span><a href="Distribution.PackageDescription.Configuration.html#flattenPackageDescription"><span class="hs-identifier hs-var hs-var">flattenPackageDescription</span></a></span></span><span>
</span><span id="line-509"></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.GenericPackageDescription.html#GenericPackageDescription"><span class="hs-identifier hs-type">GenericPackageDescription</span></a></span><span> </span><span id="local-6989586621679694642"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679694642"><span class="hs-identifier hs-var">pkg</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe Version
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[PackageFlag]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679694641"><span class="annot"><span class="annottext">Maybe (CondTree ConfVar [Dependency] Library)
</span><a href="#local-6989586621679694641"><span class="hs-identifier hs-var">mlib0</span></a></span></span><span> </span><span id="local-6989586621679694640"><span class="annot"><span class="annottext">[(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
</span><a href="#local-6989586621679694640"><span class="hs-identifier hs-var">sub_libs0</span></a></span></span><span> </span><span id="local-6989586621679694639"><span class="annot"><span class="annottext">[(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)]
</span><a href="#local-6989586621679694639"><span class="hs-identifier hs-var">flibs0</span></a></span></span><span> </span><span id="local-6989586621679694638"><span class="annot"><span class="annottext">[(UnqualComponentName, CondTree ConfVar [Dependency] Executable)]
</span><a href="#local-6989586621679694638"><span class="hs-identifier hs-var">exes0</span></a></span></span><span> </span><span id="local-6989586621679694637"><span class="annot"><span class="annottext">[(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
</span><a href="#local-6989586621679694637"><span class="hs-identifier hs-var">tests0</span></a></span></span><span> </span><span id="local-6989586621679694636"><span class="annot"><span class="annottext">[(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
</span><a href="#local-6989586621679694636"><span class="hs-identifier hs-var">bms0</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-510"></span><span>    </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679694642"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">library :: Maybe Library
</span><a href="Distribution.Types.PackageDescription.html#library"><span class="hs-identifier hs-var">library</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Library
</span><a href="#local-6989586621679694635"><span class="hs-identifier hs-var">mlib</span></a></span><span>
</span><span id="line-511"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">subLibraries :: [Library]
</span><a href="Distribution.Types.PackageDescription.html#subLibraries"><span class="hs-identifier hs-var">subLibraries</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Library] -&gt; [Library]
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">[Library]
</span><a href="#local-6989586621679694633"><span class="hs-identifier hs-var">sub_libs</span></a></span><span>
</span><span id="line-512"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">foreignLibs :: [ForeignLib]
</span><a href="Distribution.Types.PackageDescription.html#foreignLibs"><span class="hs-identifier hs-var">foreignLibs</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ForeignLib] -&gt; [ForeignLib]
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">[ForeignLib]
</span><a href="#local-6989586621679694632"><span class="hs-identifier hs-var">flibs</span></a></span><span>
</span><span id="line-513"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">executables :: [Executable]
</span><a href="Distribution.Types.PackageDescription.html#executables"><span class="hs-identifier hs-var">executables</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Executable] -&gt; [Executable]
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">[Executable]
</span><a href="#local-6989586621679694631"><span class="hs-identifier hs-var">exes</span></a></span><span>
</span><span id="line-514"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">testSuites :: [TestSuite]
</span><a href="Distribution.Types.PackageDescription.html#testSuites"><span class="hs-identifier hs-var">testSuites</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[TestSuite] -&gt; [TestSuite]
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">[TestSuite]
</span><a href="#local-6989586621679694630"><span class="hs-identifier hs-var">tests</span></a></span><span>
</span><span id="line-515"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">benchmarks :: [Benchmark]
</span><a href="Distribution.Types.PackageDescription.html#benchmarks"><span class="hs-identifier hs-var">benchmarks</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Benchmark] -&gt; [Benchmark]
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">[Benchmark]
</span><a href="#local-6989586621679694629"><span class="hs-identifier hs-var">bms</span></a></span><span>
</span><span id="line-516"></span><span>        </span><span class="hs-special">}</span><span>
</span><span id="line-517"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-518"></span><span>    </span><span id="local-6989586621679694635"><span class="annot"><span class="annottext">mlib :: Maybe Library
</span><a href="#local-6989586621679694635"><span class="hs-identifier hs-var hs-var">mlib</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CondTree ConfVar [Dependency] Library -&gt; Library
forall {b} {v}. Semigroup b =&gt; CondTree v b Library -&gt; Library
</span><a href="#local-6989586621679694625"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">(CondTree ConfVar [Dependency] Library -&gt; Library)
-&gt; Maybe (CondTree ConfVar [Dependency] Library) -&gt; Maybe Library
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (CondTree ConfVar [Dependency] Library)
</span><a href="#local-6989586621679694641"><span class="hs-identifier hs-var">mlib0</span></a></span><span>
</span><span id="line-519"></span><span>      </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679694625"><span class="annot"><span class="annottext">f :: CondTree v b Library -&gt; Library
</span><a href="#local-6989586621679694625"><span class="hs-identifier hs-var hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679694621"><span class="annot"><span class="annottext">CondTree v b Library
</span><a href="#local-6989586621679694621"><span class="hs-identifier hs-var">lib</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Library -&gt; Library
</span><a href="Distribution.PackageDescription.Configuration.html#libFillInDefaults"><span class="hs-identifier hs-var">libFillInDefaults</span></a></span><span> </span><span class="annot"><span class="annottext">(Library -&gt; Library)
-&gt; (CondTree v b Library -&gt; Library)
-&gt; CondTree v b Library
-&gt; Library
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(Library, b) -&gt; Library
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span> </span><span class="annot"><span class="annottext">((Library, b) -&gt; Library)
-&gt; (CondTree v b Library -&gt; (Library, b))
-&gt; CondTree v b Library
-&gt; Library
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">CondTree v b Library -&gt; (Library, b)
forall a c v.
(Semigroup a, Semigroup c) =&gt;
CondTree v c a -&gt; (a, c)
</span><a href="Distribution.Types.CondTree.html#ignoreConditions"><span class="hs-identifier hs-var">ignoreConditions</span></a></span><span> </span><span class="annot"><span class="annottext">(CondTree v b Library -&gt; Library)
-&gt; CondTree v b Library -&gt; Library
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CondTree v b Library
</span><a href="#local-6989586621679694621"><span class="hs-identifier hs-var">lib</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">libName :: LibraryName
</span><a href="Distribution.Types.Library.html#libName"><span class="hs-identifier hs-var">libName</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LibraryName
</span><a href="Distribution.Types.LibraryName.html#LMainLibName"><span class="hs-identifier hs-var">LMainLibName</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-520"></span><span>    </span><span id="local-6989586621679694633"><span class="annot"><span class="annottext">sub_libs :: [Library]
</span><a href="#local-6989586621679694633"><span class="hs-identifier hs-var hs-var">sub_libs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(UnqualComponentName, CondTree ConfVar [Dependency] Library)
-&gt; Library
forall {b} {v}.
Semigroup b =&gt;
(UnqualComponentName, CondTree v b Library) -&gt; Library
</span><a href="#local-6989586621679694617"><span class="hs-identifier hs-var">flattenLib</span></a></span><span>  </span><span class="annot"><span class="annottext">((UnqualComponentName, CondTree ConfVar [Dependency] Library)
 -&gt; Library)
-&gt; [(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
-&gt; [Library]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
</span><a href="#local-6989586621679694640"><span class="hs-identifier hs-var">sub_libs0</span></a></span><span>
</span><span id="line-521"></span><span>    </span><span id="local-6989586621679694632"><span class="annot"><span class="annottext">flibs :: [ForeignLib]
</span><a href="#local-6989586621679694632"><span class="hs-identifier hs-var hs-var">flibs</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)
-&gt; ForeignLib
forall {b} {v}.
Semigroup b =&gt;
(UnqualComponentName, CondTree v b ForeignLib) -&gt; ForeignLib
</span><a href="#local-6989586621679694614"><span class="hs-identifier hs-var">flattenFLib</span></a></span><span> </span><span class="annot"><span class="annottext">((UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)
 -&gt; ForeignLib)
-&gt; [(UnqualComponentName,
     CondTree ConfVar [Dependency] ForeignLib)]
-&gt; [ForeignLib]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)]
</span><a href="#local-6989586621679694639"><span class="hs-identifier hs-var">flibs0</span></a></span><span>
</span><span id="line-522"></span><span>    </span><span id="local-6989586621679694631"><span class="annot"><span class="annottext">exes :: [Executable]
</span><a href="#local-6989586621679694631"><span class="hs-identifier hs-var hs-var">exes</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(UnqualComponentName, CondTree ConfVar [Dependency] Executable)
-&gt; Executable
forall {b} {v}.
Semigroup b =&gt;
(UnqualComponentName, CondTree v b Executable) -&gt; Executable
</span><a href="#local-6989586621679694611"><span class="hs-identifier hs-var">flattenExe</span></a></span><span>  </span><span class="annot"><span class="annottext">((UnqualComponentName, CondTree ConfVar [Dependency] Executable)
 -&gt; Executable)
-&gt; [(UnqualComponentName,
     CondTree ConfVar [Dependency] Executable)]
-&gt; [Executable]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[(UnqualComponentName, CondTree ConfVar [Dependency] Executable)]
</span><a href="#local-6989586621679694638"><span class="hs-identifier hs-var">exes0</span></a></span><span>
</span><span id="line-523"></span><span>    </span><span id="local-6989586621679694630"><span class="annot"><span class="annottext">tests :: [TestSuite]
</span><a href="#local-6989586621679694630"><span class="hs-identifier hs-var hs-var">tests</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)
-&gt; TestSuite
forall {b} {v}.
Semigroup b =&gt;
(UnqualComponentName, CondTree v b TestSuite) -&gt; TestSuite
</span><a href="#local-6989586621679694608"><span class="hs-identifier hs-var">flattenTst</span></a></span><span>  </span><span class="annot"><span class="annottext">((UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)
 -&gt; TestSuite)
-&gt; [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
-&gt; [TestSuite]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
</span><a href="#local-6989586621679694637"><span class="hs-identifier hs-var">tests0</span></a></span><span>
</span><span id="line-524"></span><span>    </span><span id="local-6989586621679694629"><span class="annot"><span class="annottext">bms :: [Benchmark]
</span><a href="#local-6989586621679694629"><span class="hs-identifier hs-var hs-var">bms</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)
-&gt; Benchmark
forall {b} {v}.
Semigroup b =&gt;
(UnqualComponentName, CondTree v b Benchmark) -&gt; Benchmark
</span><a href="#local-6989586621679694605"><span class="hs-identifier hs-var">flattenBm</span></a></span><span>   </span><span class="annot"><span class="annottext">((UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)
 -&gt; Benchmark)
-&gt; [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
-&gt; [Benchmark]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
</span><a href="#local-6989586621679694636"><span class="hs-identifier hs-var">bms0</span></a></span><span>
</span><span id="line-525"></span><span>    </span><span id="local-6989586621679694617"><span class="annot"><span class="annottext">flattenLib :: (UnqualComponentName, CondTree v b Library) -&gt; Library
</span><a href="#local-6989586621679694617"><span class="hs-identifier hs-var hs-var">flattenLib</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679694601"><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694601"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679694600"><span class="annot"><span class="annottext">CondTree v b Library
</span><a href="#local-6989586621679694600"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Library -&gt; Library
</span><a href="Distribution.PackageDescription.Configuration.html#libFillInDefaults"><span class="hs-identifier hs-var">libFillInDefaults</span></a></span><span> </span><span class="annot"><span class="annottext">(Library -&gt; Library) -&gt; Library -&gt; Library
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Library, b) -&gt; Library
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span> </span><span class="annot"><span class="annottext">((Library, b) -&gt; Library) -&gt; (Library, b) -&gt; Library
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CondTree v b Library -&gt; (Library, b)
forall a c v.
(Semigroup a, Semigroup c) =&gt;
CondTree v c a -&gt; (a, c)
</span><a href="Distribution.Types.CondTree.html#ignoreConditions"><span class="hs-identifier hs-var">ignoreConditions</span></a></span><span> </span><span class="annot"><span class="annottext">CondTree v b Library
</span><a href="#local-6989586621679694600"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-526"></span><span>      </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">libName :: LibraryName
</span><a href="Distribution.Types.Library.html#libName"><span class="hs-identifier hs-var">libName</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; LibraryName
</span><a href="Distribution.Types.LibraryName.html#LSubLibName"><span class="hs-identifier hs-var">LSubLibName</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694601"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">libExposed :: Bool
</span><a href="Distribution.Types.Library.html#libExposed"><span class="hs-identifier hs-var">libExposed</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-527"></span><span>    </span><span id="local-6989586621679694614"><span class="annot"><span class="annottext">flattenFLib :: (UnqualComponentName, CondTree v b ForeignLib) -&gt; ForeignLib
</span><a href="#local-6989586621679694614"><span class="hs-identifier hs-var hs-var">flattenFLib</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679694595"><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694595"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679694594"><span class="annot"><span class="annottext">CondTree v b ForeignLib
</span><a href="#local-6989586621679694594"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ForeignLib -&gt; ForeignLib
</span><a href="Distribution.PackageDescription.Configuration.html#flibFillInDefaults"><span class="hs-identifier hs-var">flibFillInDefaults</span></a></span><span> </span><span class="annot"><span class="annottext">(ForeignLib -&gt; ForeignLib) -&gt; ForeignLib -&gt; ForeignLib
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(ForeignLib, b) -&gt; ForeignLib
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span> </span><span class="annot"><span class="annottext">((ForeignLib, b) -&gt; ForeignLib) -&gt; (ForeignLib, b) -&gt; ForeignLib
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CondTree v b ForeignLib -&gt; (ForeignLib, b)
forall a c v.
(Semigroup a, Semigroup c) =&gt;
CondTree v c a -&gt; (a, c)
</span><a href="Distribution.Types.CondTree.html#ignoreConditions"><span class="hs-identifier hs-var">ignoreConditions</span></a></span><span> </span><span class="annot"><span class="annottext">CondTree v b ForeignLib
</span><a href="#local-6989586621679694594"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-528"></span><span>      </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">foreignLibName :: UnqualComponentName
</span><a href="Distribution.Types.ForeignLib.html#foreignLibName"><span class="hs-identifier hs-var">foreignLibName</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694595"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-529"></span><span>    </span><span id="local-6989586621679694611"><span class="annot"><span class="annottext">flattenExe :: (UnqualComponentName, CondTree v b Executable) -&gt; Executable
</span><a href="#local-6989586621679694611"><span class="hs-identifier hs-var hs-var">flattenExe</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679694589"><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694589"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679694588"><span class="annot"><span class="annottext">CondTree v b Executable
</span><a href="#local-6989586621679694588"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Executable -&gt; Executable
</span><a href="Distribution.PackageDescription.Configuration.html#exeFillInDefaults"><span class="hs-identifier hs-var">exeFillInDefaults</span></a></span><span> </span><span class="annot"><span class="annottext">(Executable -&gt; Executable) -&gt; Executable -&gt; Executable
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Executable, b) -&gt; Executable
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span> </span><span class="annot"><span class="annottext">((Executable, b) -&gt; Executable) -&gt; (Executable, b) -&gt; Executable
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CondTree v b Executable -&gt; (Executable, b)
forall a c v.
(Semigroup a, Semigroup c) =&gt;
CondTree v c a -&gt; (a, c)
</span><a href="Distribution.Types.CondTree.html#ignoreConditions"><span class="hs-identifier hs-var">ignoreConditions</span></a></span><span> </span><span class="annot"><span class="annottext">CondTree v b Executable
</span><a href="#local-6989586621679694588"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-530"></span><span>      </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">exeName :: UnqualComponentName
</span><a href="Distribution.Types.Executable.html#exeName"><span class="hs-identifier hs-var">exeName</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694589"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-531"></span><span>    </span><span id="local-6989586621679694608"><span class="annot"><span class="annottext">flattenTst :: (UnqualComponentName, CondTree v b TestSuite) -&gt; TestSuite
</span><a href="#local-6989586621679694608"><span class="hs-identifier hs-var hs-var">flattenTst</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679694583"><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694583"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679694582"><span class="annot"><span class="annottext">CondTree v b TestSuite
</span><a href="#local-6989586621679694582"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TestSuite -&gt; TestSuite
</span><a href="Distribution.PackageDescription.Configuration.html#testFillInDefaults"><span class="hs-identifier hs-var">testFillInDefaults</span></a></span><span> </span><span class="annot"><span class="annottext">(TestSuite -&gt; TestSuite) -&gt; TestSuite -&gt; TestSuite
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(TestSuite, b) -&gt; TestSuite
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span> </span><span class="annot"><span class="annottext">((TestSuite, b) -&gt; TestSuite) -&gt; (TestSuite, b) -&gt; TestSuite
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CondTree v b TestSuite -&gt; (TestSuite, b)
forall a c v.
(Semigroup a, Semigroup c) =&gt;
CondTree v c a -&gt; (a, c)
</span><a href="Distribution.Types.CondTree.html#ignoreConditions"><span class="hs-identifier hs-var">ignoreConditions</span></a></span><span> </span><span class="annot"><span class="annottext">CondTree v b TestSuite
</span><a href="#local-6989586621679694582"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-532"></span><span>      </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">testName :: UnqualComponentName
</span><a href="Distribution.Types.TestSuite.html#testName"><span class="hs-identifier hs-var">testName</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694583"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-533"></span><span>    </span><span id="local-6989586621679694605"><span class="annot"><span class="annottext">flattenBm :: (UnqualComponentName, CondTree v b Benchmark) -&gt; Benchmark
</span><a href="#local-6989586621679694605"><span class="hs-identifier hs-var hs-var">flattenBm</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679694577"><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694577"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679694576"><span class="annot"><span class="annottext">CondTree v b Benchmark
</span><a href="#local-6989586621679694576"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Benchmark -&gt; Benchmark
</span><a href="Distribution.PackageDescription.Configuration.html#benchFillInDefaults"><span class="hs-identifier hs-var">benchFillInDefaults</span></a></span><span> </span><span class="annot"><span class="annottext">(Benchmark -&gt; Benchmark) -&gt; Benchmark -&gt; Benchmark
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Benchmark, b) -&gt; Benchmark
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span> </span><span class="annot"><span class="annottext">((Benchmark, b) -&gt; Benchmark) -&gt; (Benchmark, b) -&gt; Benchmark
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CondTree v b Benchmark -&gt; (Benchmark, b)
forall a c v.
(Semigroup a, Semigroup c) =&gt;
CondTree v c a -&gt; (a, c)
</span><a href="Distribution.Types.CondTree.html#ignoreConditions"><span class="hs-identifier hs-var">ignoreConditions</span></a></span><span> </span><span class="annot"><span class="annottext">CondTree v b Benchmark
</span><a href="#local-6989586621679694576"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-534"></span><span>      </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">benchmarkName :: UnqualComponentName
</span><a href="Distribution.Types.Benchmark.html#benchmarkName"><span class="hs-identifier hs-var">benchmarkName</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679694577"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-535"></span><span>
</span><span id="line-536"></span><span class="hs-comment">-- This is in fact rather a hack.  The original version just overrode the</span><span>
</span><span id="line-537"></span><span class="hs-comment">-- default values, however, when adding conditions we had to switch to a</span><span>
</span><span id="line-538"></span><span class="hs-comment">-- modifier-based approach.  There, nothing is ever overwritten, but only</span><span>
</span><span id="line-539"></span><span class="hs-comment">-- joined together.</span><span>
</span><span id="line-540"></span><span class="hs-comment">--</span><span>
</span><span id="line-541"></span><span class="hs-comment">-- This is the cleanest way i could think of, that doesn't require</span><span>
</span><span id="line-542"></span><span class="hs-comment">-- changing all field parsing functions to return modifiers instead.</span><span>
</span><span id="line-543"></span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#libFillInDefaults"><span class="hs-identifier hs-type">libFillInDefaults</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.Library.html#Library"><span class="hs-identifier hs-type">Library</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.Library.html#Library"><span class="hs-identifier hs-type">Library</span></a></span><span>
</span><span id="line-544"></span><span id="libFillInDefaults"><span class="annot"><span class="annottext">libFillInDefaults :: Library -&gt; Library
</span><a href="Distribution.PackageDescription.Configuration.html#libFillInDefaults"><span class="hs-identifier hs-var hs-var">libFillInDefaults</span></a></span></span><span> </span><span id="local-6989586621679694575"><span class="annot"><span class="annottext">lib :: Library
</span><a href="#local-6989586621679694575"><span class="hs-identifier hs-var">lib</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.Library.html#Library"><span class="hs-identifier hs-type">Library</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">libBuildInfo :: Library -&gt; BuildInfo
</span><a href="Distribution.Types.Library.html#libBuildInfo"><span class="hs-identifier hs-var">libBuildInfo</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679694573"><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679694573"><span class="hs-identifier hs-var">bi</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-545"></span><span>    </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679694575"><span class="hs-identifier hs-var">lib</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">libBuildInfo :: BuildInfo
</span><a href="Distribution.Types.Library.html#libBuildInfo"><span class="hs-identifier hs-var">libBuildInfo</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; BuildInfo
</span><a href="Distribution.PackageDescription.Configuration.html#biFillInDefaults"><span class="hs-identifier hs-var">biFillInDefaults</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679694573"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-546"></span><span>
</span><span id="line-547"></span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#flibFillInDefaults"><span class="hs-identifier hs-type">flibFillInDefaults</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.ForeignLib.html#ForeignLib"><span class="hs-identifier hs-type">ForeignLib</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ForeignLib.html#ForeignLib"><span class="hs-identifier hs-type">ForeignLib</span></a></span><span>
</span><span id="line-548"></span><span id="flibFillInDefaults"><span class="annot"><span class="annottext">flibFillInDefaults :: ForeignLib -&gt; ForeignLib
</span><a href="Distribution.PackageDescription.Configuration.html#flibFillInDefaults"><span class="hs-identifier hs-var hs-var">flibFillInDefaults</span></a></span></span><span> </span><span id="local-6989586621679694571"><span class="annot"><span class="annottext">flib :: ForeignLib
</span><a href="#local-6989586621679694571"><span class="hs-identifier hs-var">flib</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.ForeignLib.html#ForeignLib"><span class="hs-identifier hs-type">ForeignLib</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">foreignLibBuildInfo :: ForeignLib -&gt; BuildInfo
</span><a href="Distribution.Types.ForeignLib.html#foreignLibBuildInfo"><span class="hs-identifier hs-var">foreignLibBuildInfo</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679694568"><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679694568"><span class="hs-identifier hs-var">bi</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-549"></span><span>    </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679694571"><span class="hs-identifier hs-var">flib</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">foreignLibBuildInfo :: BuildInfo
</span><a href="Distribution.Types.ForeignLib.html#foreignLibBuildInfo"><span class="hs-identifier hs-var">foreignLibBuildInfo</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; BuildInfo
</span><a href="Distribution.PackageDescription.Configuration.html#biFillInDefaults"><span class="hs-identifier hs-var">biFillInDefaults</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679694568"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-550"></span><span>
</span><span id="line-551"></span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#exeFillInDefaults"><span class="hs-identifier hs-type">exeFillInDefaults</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.Executable.html#Executable"><span class="hs-identifier hs-type">Executable</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.Executable.html#Executable"><span class="hs-identifier hs-type">Executable</span></a></span><span>
</span><span id="line-552"></span><span id="exeFillInDefaults"><span class="annot"><span class="annottext">exeFillInDefaults :: Executable -&gt; Executable
</span><a href="Distribution.PackageDescription.Configuration.html#exeFillInDefaults"><span class="hs-identifier hs-var hs-var">exeFillInDefaults</span></a></span></span><span> </span><span id="local-6989586621679694567"><span class="annot"><span class="annottext">exe :: Executable
</span><a href="#local-6989586621679694567"><span class="hs-identifier hs-var">exe</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.Executable.html#Executable"><span class="hs-identifier hs-type">Executable</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">buildInfo :: Executable -&gt; BuildInfo
</span><a href="Distribution.Types.Executable.html#buildInfo"><span class="hs-identifier hs-var">buildInfo</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679694565"><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679694565"><span class="hs-identifier hs-var">bi</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-553"></span><span>    </span><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679694567"><span class="hs-identifier hs-var">exe</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">buildInfo :: BuildInfo
</span><a href="Distribution.Types.Executable.html#buildInfo"><span class="hs-identifier hs-var">buildInfo</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; BuildInfo
</span><a href="Distribution.PackageDescription.Configuration.html#biFillInDefaults"><span class="hs-identifier hs-var">biFillInDefaults</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679694565"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-554"></span><span>
</span><span id="line-555"></span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#testFillInDefaults"><span class="hs-identifier hs-type">testFillInDefaults</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.TestSuite.html#TestSuite"><span class="hs-identifier hs-type">TestSuite</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.TestSuite.html#TestSuite"><span class="hs-identifier hs-type">TestSuite</span></a></span><span>
</span><span id="line-556"></span><span id="testFillInDefaults"><span class="annot"><span class="annottext">testFillInDefaults :: TestSuite -&gt; TestSuite
</span><a href="Distribution.PackageDescription.Configuration.html#testFillInDefaults"><span class="hs-identifier hs-var hs-var">testFillInDefaults</span></a></span></span><span> </span><span id="local-6989586621679694564"><span class="annot"><span class="annottext">tst :: TestSuite
</span><a href="#local-6989586621679694564"><span class="hs-identifier hs-var">tst</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.TestSuite.html#TestSuite"><span class="hs-identifier hs-type">TestSuite</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">testBuildInfo :: TestSuite -&gt; BuildInfo
</span><a href="Distribution.Types.TestSuite.html#testBuildInfo"><span class="hs-identifier hs-var">testBuildInfo</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679694562"><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679694562"><span class="hs-identifier hs-var">bi</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-557"></span><span>    </span><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679694564"><span class="hs-identifier hs-var">tst</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">testBuildInfo :: BuildInfo
</span><a href="Distribution.Types.TestSuite.html#testBuildInfo"><span class="hs-identifier hs-var">testBuildInfo</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; BuildInfo
</span><a href="Distribution.PackageDescription.Configuration.html#biFillInDefaults"><span class="hs-identifier hs-var">biFillInDefaults</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679694562"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-558"></span><span>
</span><span id="line-559"></span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#benchFillInDefaults"><span class="hs-identifier hs-type">benchFillInDefaults</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.Benchmark.html#Benchmark"><span class="hs-identifier hs-type">Benchmark</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.Benchmark.html#Benchmark"><span class="hs-identifier hs-type">Benchmark</span></a></span><span>
</span><span id="line-560"></span><span id="benchFillInDefaults"><span class="annot"><span class="annottext">benchFillInDefaults :: Benchmark -&gt; Benchmark
</span><a href="Distribution.PackageDescription.Configuration.html#benchFillInDefaults"><span class="hs-identifier hs-var hs-var">benchFillInDefaults</span></a></span></span><span> </span><span id="local-6989586621679694561"><span class="annot"><span class="annottext">bm :: Benchmark
</span><a href="#local-6989586621679694561"><span class="hs-identifier hs-var">bm</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.Benchmark.html#Benchmark"><span class="hs-identifier hs-type">Benchmark</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">benchmarkBuildInfo :: Benchmark -&gt; BuildInfo
</span><a href="Distribution.Types.Benchmark.html#benchmarkBuildInfo"><span class="hs-identifier hs-var">benchmarkBuildInfo</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679694559"><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679694559"><span class="hs-identifier hs-var">bi</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-561"></span><span>    </span><span class="annot"><span class="annottext">Benchmark
</span><a href="#local-6989586621679694561"><span class="hs-identifier hs-var">bm</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">benchmarkBuildInfo :: BuildInfo
</span><a href="Distribution.Types.Benchmark.html#benchmarkBuildInfo"><span class="hs-identifier hs-var">benchmarkBuildInfo</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; BuildInfo
</span><a href="Distribution.PackageDescription.Configuration.html#biFillInDefaults"><span class="hs-identifier hs-var">biFillInDefaults</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679694559"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-562"></span><span>
</span><span id="line-563"></span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#biFillInDefaults"><span class="hs-identifier hs-type">biFillInDefaults</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.BuildInfo.html#BuildInfo"><span class="hs-identifier hs-type">BuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.BuildInfo.html#BuildInfo"><span class="hs-identifier hs-type">BuildInfo</span></a></span><span>
</span><span id="line-564"></span><span id="biFillInDefaults"><span class="annot"><span class="annottext">biFillInDefaults :: BuildInfo -&gt; BuildInfo
</span><a href="Distribution.PackageDescription.Configuration.html#biFillInDefaults"><span class="hs-identifier hs-var hs-var">biFillInDefaults</span></a></span></span><span> </span><span id="local-6989586621679694558"><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679694558"><span class="hs-identifier hs-var">bi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-565"></span><span>    </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#hsSourceDirs"><span class="hs-identifier hs-var hs-var">hsSourceDirs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679694558"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-566"></span><span>    </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679694558"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hsSourceDirs :: [String]
</span><a href="Distribution.Types.BuildInfo.html#hsSourceDirs"><span class="hs-identifier hs-var">hsSourceDirs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><a href="Distribution.Simple.Utils.html#currentDir"><span class="hs-identifier hs-var">currentDir</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-567"></span><span>    </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679694558"><span class="hs-identifier hs-var">bi</span></a></span><span>
</span><span id="line-568"></span><span>
</span><span id="line-569"></span><span class="hs-comment">-- Walk a 'GenericPackageDescription' and apply @onBuildInfo@/@onSetupBuildInfo@</span><span>
</span><span id="line-570"></span><span class="hs-comment">-- to all nested 'BuildInfo'/'SetupBuildInfo' values.</span><span>
</span><span id="line-571"></span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#transformAllBuildInfos"><span class="hs-identifier hs-type">transformAllBuildInfos</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.BuildInfo.html#BuildInfo"><span class="hs-identifier hs-type">BuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.BuildInfo.html#BuildInfo"><span class="hs-identifier hs-type">BuildInfo</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-572"></span><span>                       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.SetupBuildInfo.html#SetupBuildInfo"><span class="hs-identifier hs-type">SetupBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.SetupBuildInfo.html#SetupBuildInfo"><span class="hs-identifier hs-type">SetupBuildInfo</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-573"></span><span>                       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.GenericPackageDescription.html#GenericPackageDescription"><span class="hs-identifier hs-type">GenericPackageDescription</span></a></span><span>
</span><span id="line-574"></span><span>                       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.GenericPackageDescription.html#GenericPackageDescription"><span class="hs-identifier hs-type">GenericPackageDescription</span></a></span><span>
</span><span id="line-575"></span><span id="transformAllBuildInfos"><span class="annot"><span class="annottext">transformAllBuildInfos :: (BuildInfo -&gt; BuildInfo)
-&gt; (SetupBuildInfo -&gt; SetupBuildInfo)
-&gt; GenericPackageDescription
-&gt; GenericPackageDescription
</span><a href="Distribution.PackageDescription.Configuration.html#transformAllBuildInfos"><span class="hs-identifier hs-var hs-var">transformAllBuildInfos</span></a></span></span><span> </span><span id="local-6989586621679694555"><span class="annot"><span class="annottext">BuildInfo -&gt; BuildInfo
</span><a href="#local-6989586621679694555"><span class="hs-identifier hs-var">onBuildInfo</span></a></span></span><span> </span><span id="local-6989586621679694554"><span class="annot"><span class="annottext">SetupBuildInfo -&gt; SetupBuildInfo
</span><a href="#local-6989586621679694554"><span class="hs-identifier hs-var">onSetupBuildInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-576"></span><span>  </span><span class="annot"><span class="annottext">ASetter
  GenericPackageDescription
  GenericPackageDescription
  BuildInfo
  BuildInfo
-&gt; (BuildInfo -&gt; BuildInfo)
-&gt; GenericPackageDescription
-&gt; GenericPackageDescription
forall s t a b. ASetter s t a b -&gt; (a -&gt; b) -&gt; s -&gt; t
</span><a href="Distribution.Compat.Lens.html#over"><span class="hs-identifier hs-var">over</span></a></span><span> </span><span class="annot"><span class="annottext">ASetter
  GenericPackageDescription
  GenericPackageDescription
  BuildInfo
  BuildInfo
forall a. HasBuildInfos a =&gt; Traversal' a BuildInfo
</span><a href="Distribution.Types.BuildInfo.Lens.html#traverseBuildInfos"><span class="hs-identifier hs-var">L.traverseBuildInfos</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; BuildInfo
</span><a href="#local-6989586621679694555"><span class="hs-identifier hs-var">onBuildInfo</span></a></span><span>
</span><span id="line-577"></span><span>  </span><span class="annot"><span class="annottext">(GenericPackageDescription -&gt; GenericPackageDescription)
-&gt; (GenericPackageDescription -&gt; GenericPackageDescription)
-&gt; GenericPackageDescription
-&gt; GenericPackageDescription
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ASetter
  GenericPackageDescription
  GenericPackageDescription
  SetupBuildInfo
  SetupBuildInfo
-&gt; (SetupBuildInfo -&gt; SetupBuildInfo)
-&gt; GenericPackageDescription
-&gt; GenericPackageDescription
forall s t a b. ASetter s t a b -&gt; (a -&gt; b) -&gt; s -&gt; t
</span><a href="Distribution.Compat.Lens.html#over"><span class="hs-identifier hs-var">over</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LensLike
  Identity
  GenericPackageDescription
  GenericPackageDescription
  PackageDescription
  PackageDescription
Lens' GenericPackageDescription PackageDescription
</span><a href="Distribution.Types.GenericPackageDescription.Lens.html#packageDescription"><span class="hs-identifier hs-var">L.packageDescription</span></a></span><span> </span><span class="annot"><span class="annottext">LensLike
  Identity
  GenericPackageDescription
  GenericPackageDescription
  PackageDescription
  PackageDescription
-&gt; ((SetupBuildInfo -&gt; Identity SetupBuildInfo)
    -&gt; PackageDescription -&gt; Identity PackageDescription)
-&gt; ASetter
     GenericPackageDescription
     GenericPackageDescription
     SetupBuildInfo
     SetupBuildInfo
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">LensLike
  Identity
  PackageDescription
  PackageDescription
  (Maybe SetupBuildInfo)
  (Maybe SetupBuildInfo)
Lens' PackageDescription (Maybe SetupBuildInfo)
</span><a href="Distribution.Types.PackageDescription.Lens.html#setupBuildInfo"><span class="hs-identifier hs-var">L.setupBuildInfo</span></a></span><span> </span><span class="annot"><span class="annottext">LensLike
  Identity
  PackageDescription
  PackageDescription
  (Maybe SetupBuildInfo)
  (Maybe SetupBuildInfo)
-&gt; ((SetupBuildInfo -&gt; Identity SetupBuildInfo)
    -&gt; Maybe SetupBuildInfo -&gt; Identity (Maybe SetupBuildInfo))
-&gt; (SetupBuildInfo -&gt; Identity SetupBuildInfo)
-&gt; PackageDescription
-&gt; Identity PackageDescription
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(SetupBuildInfo -&gt; Identity SetupBuildInfo)
-&gt; Maybe SetupBuildInfo -&gt; Identity (Maybe SetupBuildInfo)
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SetupBuildInfo -&gt; SetupBuildInfo
</span><a href="#local-6989586621679694554"><span class="hs-identifier hs-var">onSetupBuildInfo</span></a></span><span>
</span><span id="line-578"></span><span>
</span><span id="line-579"></span><span class="hs-comment">-- | Walk a 'GenericPackageDescription' and apply @f@ to all nested</span><span>
</span><span id="line-580"></span><span class="hs-comment">-- @build-depends@ fields.</span><span>
</span><span id="line-581"></span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#transformAllBuildDepends"><span class="hs-identifier hs-type">transformAllBuildDepends</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.Dependency.html#Dependency"><span class="hs-identifier hs-type">Dependency</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.Dependency.html#Dependency"><span class="hs-identifier hs-type">Dependency</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-582"></span><span>                         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.GenericPackageDescription.html#GenericPackageDescription"><span class="hs-identifier hs-type">GenericPackageDescription</span></a></span><span>
</span><span id="line-583"></span><span>                         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.GenericPackageDescription.html#GenericPackageDescription"><span class="hs-identifier hs-type">GenericPackageDescription</span></a></span><span>
</span><span id="line-584"></span><span id="transformAllBuildDepends"><span class="annot"><span class="annottext">transformAllBuildDepends :: (Dependency -&gt; Dependency)
-&gt; GenericPackageDescription -&gt; GenericPackageDescription
</span><a href="Distribution.PackageDescription.Configuration.html#transformAllBuildDepends"><span class="hs-identifier hs-var hs-var">transformAllBuildDepends</span></a></span></span><span> </span><span id="local-6989586621679694548"><span class="annot"><span class="annottext">Dependency -&gt; Dependency
</span><a href="#local-6989586621679694548"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-585"></span><span>  </span><span class="annot"><span class="annottext">ASetter
  GenericPackageDescription
  GenericPackageDescription
  Dependency
  Dependency
-&gt; (Dependency -&gt; Dependency)
-&gt; GenericPackageDescription
-&gt; GenericPackageDescription
forall s t a b. ASetter s t a b -&gt; (a -&gt; b) -&gt; s -&gt; t
</span><a href="Distribution.Compat.Lens.html#over"><span class="hs-identifier hs-var">over</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ASetter
  GenericPackageDescription
  GenericPackageDescription
  BuildInfo
  BuildInfo
forall a. HasBuildInfos a =&gt; Traversal' a BuildInfo
</span><a href="Distribution.Types.BuildInfo.Lens.html#traverseBuildInfos"><span class="hs-identifier hs-var">L.traverseBuildInfos</span></a></span><span> </span><span class="annot"><span class="annottext">ASetter
  GenericPackageDescription
  GenericPackageDescription
  BuildInfo
  BuildInfo
-&gt; ((Dependency -&gt; Identity Dependency)
    -&gt; BuildInfo -&gt; Identity BuildInfo)
-&gt; ASetter
     GenericPackageDescription
     GenericPackageDescription
     Dependency
     Dependency
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">LensLike Identity BuildInfo BuildInfo [Dependency] [Dependency]
forall a. HasBuildInfo a =&gt; Lens' a [Dependency]
</span><a href="Distribution.Types.BuildInfo.Lens.html#targetBuildDepends"><span class="hs-identifier hs-var">L.targetBuildDepends</span></a></span><span> </span><span class="annot"><span class="annottext">LensLike Identity BuildInfo BuildInfo [Dependency] [Dependency]
-&gt; ((Dependency -&gt; Identity Dependency)
    -&gt; [Dependency] -&gt; Identity [Dependency])
-&gt; (Dependency -&gt; Identity Dependency)
-&gt; BuildInfo
-&gt; Identity BuildInfo
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(Dependency -&gt; Identity Dependency)
-&gt; [Dependency] -&gt; Identity [Dependency]
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Dependency -&gt; Dependency
</span><a href="#local-6989586621679694548"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-586"></span><span>  </span><span class="annot"><span class="annottext">(GenericPackageDescription -&gt; GenericPackageDescription)
-&gt; (GenericPackageDescription -&gt; GenericPackageDescription)
-&gt; GenericPackageDescription
-&gt; GenericPackageDescription
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ASetter
  GenericPackageDescription
  GenericPackageDescription
  Dependency
  Dependency
-&gt; (Dependency -&gt; Dependency)
-&gt; GenericPackageDescription
-&gt; GenericPackageDescription
forall s t a b. ASetter s t a b -&gt; (a -&gt; b) -&gt; s -&gt; t
</span><a href="Distribution.Compat.Lens.html#over"><span class="hs-identifier hs-var">over</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LensLike
  Identity
  GenericPackageDescription
  GenericPackageDescription
  PackageDescription
  PackageDescription
Lens' GenericPackageDescription PackageDescription
</span><a href="Distribution.Types.GenericPackageDescription.Lens.html#packageDescription"><span class="hs-identifier hs-var">L.packageDescription</span></a></span><span> </span><span class="annot"><span class="annottext">LensLike
  Identity
  GenericPackageDescription
  GenericPackageDescription
  PackageDescription
  PackageDescription
-&gt; ((Dependency -&gt; Identity Dependency)
    -&gt; PackageDescription -&gt; Identity PackageDescription)
-&gt; ASetter
     GenericPackageDescription
     GenericPackageDescription
     Dependency
     Dependency
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">LensLike
  Identity
  PackageDescription
  PackageDescription
  (Maybe SetupBuildInfo)
  (Maybe SetupBuildInfo)
Lens' PackageDescription (Maybe SetupBuildInfo)
</span><a href="Distribution.Types.PackageDescription.Lens.html#setupBuildInfo"><span class="hs-identifier hs-var">L.setupBuildInfo</span></a></span><span> </span><span class="annot"><span class="annottext">LensLike
  Identity
  PackageDescription
  PackageDescription
  (Maybe SetupBuildInfo)
  (Maybe SetupBuildInfo)
-&gt; ((Dependency -&gt; Identity Dependency)
    -&gt; Maybe SetupBuildInfo -&gt; Identity (Maybe SetupBuildInfo))
-&gt; (Dependency -&gt; Identity Dependency)
-&gt; PackageDescription
-&gt; Identity PackageDescription
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(SetupBuildInfo -&gt; Identity SetupBuildInfo)
-&gt; Maybe SetupBuildInfo -&gt; Identity (Maybe SetupBuildInfo)
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="annot"><span class="annottext">((SetupBuildInfo -&gt; Identity SetupBuildInfo)
 -&gt; Maybe SetupBuildInfo -&gt; Identity (Maybe SetupBuildInfo))
-&gt; ((Dependency -&gt; Identity Dependency)
    -&gt; SetupBuildInfo -&gt; Identity SetupBuildInfo)
-&gt; (Dependency -&gt; Identity Dependency)
-&gt; Maybe SetupBuildInfo
-&gt; Identity (Maybe SetupBuildInfo)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">LensLike
  Identity SetupBuildInfo SetupBuildInfo [Dependency] [Dependency]
Lens' SetupBuildInfo [Dependency]
</span><a href="Distribution.Types.SetupBuildInfo.Lens.html#setupDepends"><span class="hs-identifier hs-var">L.setupDepends</span></a></span><span> </span><span class="annot"><span class="annottext">LensLike
  Identity SetupBuildInfo SetupBuildInfo [Dependency] [Dependency]
-&gt; ((Dependency -&gt; Identity Dependency)
    -&gt; [Dependency] -&gt; Identity [Dependency])
-&gt; (Dependency -&gt; Identity Dependency)
-&gt; SetupBuildInfo
-&gt; Identity SetupBuildInfo
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(Dependency -&gt; Identity Dependency)
-&gt; [Dependency] -&gt; Identity [Dependency]
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Dependency -&gt; Dependency
</span><a href="#local-6989586621679694548"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-587"></span><span>  </span><span class="hs-comment">-- cannot be point-free as normal because of higher rank</span><span>
</span><span id="line-588"></span><span>  </span><span class="annot"><span class="annottext">(GenericPackageDescription -&gt; GenericPackageDescription)
-&gt; (GenericPackageDescription -&gt; GenericPackageDescription)
-&gt; GenericPackageDescription
-&gt; GenericPackageDescription
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ASetter
  GenericPackageDescription
  GenericPackageDescription
  [Dependency]
  [Dependency]
-&gt; ([Dependency] -&gt; [Dependency])
-&gt; GenericPackageDescription
-&gt; GenericPackageDescription
forall s t a b. ASetter s t a b -&gt; (a -&gt; b) -&gt; s -&gt; t
</span><a href="Distribution.Compat.Lens.html#over"><span class="hs-identifier hs-var">over</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679694546"><span class="annot"><span class="annottext">[Dependency] -&gt; Identity [Dependency]
</span><a href="#local-6989586621679694546"><span class="hs-identifier hs-var">f'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(forall a.
 CondTree ConfVar [Dependency] a
 -&gt; Identity (CondTree ConfVar [Dependency] a))
-&gt; GenericPackageDescription -&gt; Identity GenericPackageDescription
forall (f :: * -&gt; *).
Applicative f =&gt;
(forall a.
 CondTree ConfVar [Dependency] a
 -&gt; f (CondTree ConfVar [Dependency] a))
-&gt; GenericPackageDescription -&gt; f GenericPackageDescription
</span><a href="Distribution.Types.GenericPackageDescription.Lens.html#allCondTrees"><span class="hs-identifier hs-var">L.allCondTrees</span></a></span><span> </span><span class="annot"><span class="annottext">((forall a.
  CondTree ConfVar [Dependency] a
  -&gt; Identity (CondTree ConfVar [Dependency] a))
 -&gt; GenericPackageDescription -&gt; Identity GenericPackageDescription)
-&gt; (forall a.
    CondTree ConfVar [Dependency] a
    -&gt; Identity (CondTree ConfVar [Dependency] a))
-&gt; GenericPackageDescription
-&gt; Identity GenericPackageDescription
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LensLike
  Identity
  (CondTree ConfVar [Dependency] a)
  (CondTree ConfVar [Dependency] a)
  [Dependency]
  [Dependency]
forall v c a d. Traversal (CondTree v c a) (CondTree v d a) c d
</span><a href="Distribution.Types.CondTree.html#traverseCondTreeC"><span class="hs-identifier hs-var">traverseCondTreeC</span></a></span><span> </span><span class="annot"><span class="annottext">[Dependency] -&gt; Identity [Dependency]
</span><a href="#local-6989586621679694546"><span class="hs-identifier hs-var">f'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Dependency -&gt; Dependency) -&gt; [Dependency] -&gt; [Dependency]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Dependency -&gt; Dependency
</span><a href="#local-6989586621679694548"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-589"></span><span>
</span><span id="line-590"></span><span class="hs-comment">-- | Walk a 'GenericPackageDescription' and apply @f@ to all nested</span><span>
</span><span id="line-591"></span><span class="hs-comment">-- @build-depends@ fields.</span><span>
</span><span id="line-592"></span><span class="annot"><a href="Distribution.PackageDescription.Configuration.html#transformAllBuildDependsN"><span class="hs-identifier hs-type">transformAllBuildDependsN</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.Dependency.html#Dependency"><span class="hs-identifier hs-type">Dependency</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.Dependency.html#Dependency"><span class="hs-identifier hs-type">Dependency</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-593"></span><span>                          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.GenericPackageDescription.html#GenericPackageDescription"><span class="hs-identifier hs-type">GenericPackageDescription</span></a></span><span>
</span><span id="line-594"></span><span>                          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.GenericPackageDescription.html#GenericPackageDescription"><span class="hs-identifier hs-type">GenericPackageDescription</span></a></span><span>
</span><span id="line-595"></span><span id="transformAllBuildDependsN"><span class="annot"><span class="annottext">transformAllBuildDependsN :: ([Dependency] -&gt; [Dependency])
-&gt; GenericPackageDescription -&gt; GenericPackageDescription
</span><a href="Distribution.PackageDescription.Configuration.html#transformAllBuildDependsN"><span class="hs-identifier hs-var hs-var">transformAllBuildDependsN</span></a></span></span><span> </span><span id="local-6989586621679694542"><span class="annot"><span class="annottext">[Dependency] -&gt; [Dependency]
</span><a href="#local-6989586621679694542"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-596"></span><span>  </span><span class="annot"><span class="annottext">ASetter
  GenericPackageDescription
  GenericPackageDescription
  [Dependency]
  [Dependency]
-&gt; ([Dependency] -&gt; [Dependency])
-&gt; GenericPackageDescription
-&gt; GenericPackageDescription
forall s t a b. ASetter s t a b -&gt; (a -&gt; b) -&gt; s -&gt; t
</span><a href="Distribution.Compat.Lens.html#over"><span class="hs-identifier hs-var">over</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ASetter
  GenericPackageDescription
  GenericPackageDescription
  BuildInfo
  BuildInfo
forall a. HasBuildInfos a =&gt; Traversal' a BuildInfo
</span><a href="Distribution.Types.BuildInfo.Lens.html#traverseBuildInfos"><span class="hs-identifier hs-var">L.traverseBuildInfos</span></a></span><span> </span><span class="annot"><span class="annottext">ASetter
  GenericPackageDescription
  GenericPackageDescription
  BuildInfo
  BuildInfo
-&gt; LensLike Identity BuildInfo BuildInfo [Dependency] [Dependency]
-&gt; ASetter
     GenericPackageDescription
     GenericPackageDescription
     [Dependency]
     [Dependency]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">LensLike Identity BuildInfo BuildInfo [Dependency] [Dependency]
forall a. HasBuildInfo a =&gt; Lens' a [Dependency]
</span><a href="Distribution.Types.BuildInfo.Lens.html#targetBuildDepends"><span class="hs-identifier hs-var">L.targetBuildDepends</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Dependency] -&gt; [Dependency]
</span><a href="#local-6989586621679694542"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-597"></span><span>  </span><span class="annot"><span class="annottext">(GenericPackageDescription -&gt; GenericPackageDescription)
-&gt; (GenericPackageDescription -&gt; GenericPackageDescription)
-&gt; GenericPackageDescription
-&gt; GenericPackageDescription
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ASetter
  GenericPackageDescription
  GenericPackageDescription
  [Dependency]
  [Dependency]
-&gt; ([Dependency] -&gt; [Dependency])
-&gt; GenericPackageDescription
-&gt; GenericPackageDescription
forall s t a b. ASetter s t a b -&gt; (a -&gt; b) -&gt; s -&gt; t
</span><a href="Distribution.Compat.Lens.html#over"><span class="hs-identifier hs-var">over</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LensLike
  Identity
  GenericPackageDescription
  GenericPackageDescription
  PackageDescription
  PackageDescription
Lens' GenericPackageDescription PackageDescription
</span><a href="Distribution.Types.GenericPackageDescription.Lens.html#packageDescription"><span class="hs-identifier hs-var">L.packageDescription</span></a></span><span> </span><span class="annot"><span class="annottext">LensLike
  Identity
  GenericPackageDescription
  GenericPackageDescription
  PackageDescription
  PackageDescription
-&gt; (([Dependency] -&gt; Identity [Dependency])
    -&gt; PackageDescription -&gt; Identity PackageDescription)
-&gt; ASetter
     GenericPackageDescription
     GenericPackageDescription
     [Dependency]
     [Dependency]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">LensLike
  Identity
  PackageDescription
  PackageDescription
  (Maybe SetupBuildInfo)
  (Maybe SetupBuildInfo)
Lens' PackageDescription (Maybe SetupBuildInfo)
</span><a href="Distribution.Types.PackageDescription.Lens.html#setupBuildInfo"><span class="hs-identifier hs-var">L.setupBuildInfo</span></a></span><span> </span><span class="annot"><span class="annottext">LensLike
  Identity
  PackageDescription
  PackageDescription
  (Maybe SetupBuildInfo)
  (Maybe SetupBuildInfo)
-&gt; (([Dependency] -&gt; Identity [Dependency])
    -&gt; Maybe SetupBuildInfo -&gt; Identity (Maybe SetupBuildInfo))
-&gt; ([Dependency] -&gt; Identity [Dependency])
-&gt; PackageDescription
-&gt; Identity PackageDescription
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(SetupBuildInfo -&gt; Identity SetupBuildInfo)
-&gt; Maybe SetupBuildInfo -&gt; Identity (Maybe SetupBuildInfo)
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="annot"><span class="annottext">((SetupBuildInfo -&gt; Identity SetupBuildInfo)
 -&gt; Maybe SetupBuildInfo -&gt; Identity (Maybe SetupBuildInfo))
-&gt; LensLike
     Identity SetupBuildInfo SetupBuildInfo [Dependency] [Dependency]
-&gt; ([Dependency] -&gt; Identity [Dependency])
-&gt; Maybe SetupBuildInfo
-&gt; Identity (Maybe SetupBuildInfo)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">LensLike
  Identity SetupBuildInfo SetupBuildInfo [Dependency] [Dependency]
Lens' SetupBuildInfo [Dependency]
</span><a href="Distribution.Types.SetupBuildInfo.Lens.html#setupDepends"><span class="hs-identifier hs-var">L.setupDepends</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Dependency] -&gt; [Dependency]
</span><a href="#local-6989586621679694542"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-598"></span><span>  </span><span class="hs-comment">-- cannot be point-free as normal because of higher rank</span><span>
</span><span id="line-599"></span><span>  </span><span class="annot"><span class="annottext">(GenericPackageDescription -&gt; GenericPackageDescription)
-&gt; (GenericPackageDescription -&gt; GenericPackageDescription)
-&gt; GenericPackageDescription
-&gt; GenericPackageDescription
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ASetter
  GenericPackageDescription
  GenericPackageDescription
  [Dependency]
  [Dependency]
-&gt; ([Dependency] -&gt; [Dependency])
-&gt; GenericPackageDescription
-&gt; GenericPackageDescription
forall s t a b. ASetter s t a b -&gt; (a -&gt; b) -&gt; s -&gt; t
</span><a href="Distribution.Compat.Lens.html#over"><span class="hs-identifier hs-var">over</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679694541"><span class="annot"><span class="annottext">[Dependency] -&gt; Identity [Dependency]
</span><a href="#local-6989586621679694541"><span class="hs-identifier hs-var">f'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(forall a.
 CondTree ConfVar [Dependency] a
 -&gt; Identity (CondTree ConfVar [Dependency] a))
-&gt; GenericPackageDescription -&gt; Identity GenericPackageDescription
forall (f :: * -&gt; *).
Applicative f =&gt;
(forall a.
 CondTree ConfVar [Dependency] a
 -&gt; f (CondTree ConfVar [Dependency] a))
-&gt; GenericPackageDescription -&gt; f GenericPackageDescription
</span><a href="Distribution.Types.GenericPackageDescription.Lens.html#allCondTrees"><span class="hs-identifier hs-var">L.allCondTrees</span></a></span><span> </span><span class="annot"><span class="annottext">((forall a.
  CondTree ConfVar [Dependency] a
  -&gt; Identity (CondTree ConfVar [Dependency] a))
 -&gt; GenericPackageDescription -&gt; Identity GenericPackageDescription)
-&gt; (forall a.
    CondTree ConfVar [Dependency] a
    -&gt; Identity (CondTree ConfVar [Dependency] a))
-&gt; GenericPackageDescription
-&gt; Identity GenericPackageDescription
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LensLike
  Identity
  (CondTree ConfVar [Dependency] a)
  (CondTree ConfVar [Dependency] a)
  [Dependency]
  [Dependency]
forall v c a d. Traversal (CondTree v c a) (CondTree v d a) c d
</span><a href="Distribution.Types.CondTree.html#traverseCondTreeC"><span class="hs-identifier hs-var">traverseCondTreeC</span></a></span><span> </span><span class="annot"><span class="annottext">[Dependency] -&gt; Identity [Dependency]
</span><a href="#local-6989586621679694541"><span class="hs-identifier hs-var">f'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Dependency] -&gt; [Dependency]
</span><a href="#local-6989586621679694542"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-600"></span></pre></body></html>